Search Results

Search found 4767 results on 191 pages for 'dialog'.

Page 20/191 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Windows Forms Unhandled-Exception Dialog

    - by Michael
    I want to get Default Windows Forms Unhandled-Exception Dialog whenever my C# application encounters U-E. In vs 2005 when I turn off jit Debugging in app.conf like this: <configuration> <system.windows.forms jitDebugging="false" /> <configuration> the application behaves correctly and shows Windows Forms U-E default dialog, with Continue, Quit, call stack and all. However in vs 2008, on the same machine or different, even though I diable jit I still get Default .NET Unhandled-Exception Dialog, with Debug, Send Report and Don't Send buttons. How can I make my vs 2008 app act like the one I make in vs 2005, to show Windows Forms U-E dialog box? Please do not recommend to use AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); just because I don't use custom handler in my vs 2005 project, why would I use in vs 2008? I want to let this job do CLR. Any help is appreciated

    Read the article

  • Changing/Adding controls to the windows Open/Save common dialog

    - by ajp
    Is there a way of changing/adding to the windows Open/Save common dialog to add extra functionality? At work we have an area on a server with hundreds of 'jobfolders'- just ordinary windows folders created/managed automatically by the database application to house information about a job (emails/scanned faxes/Word docs/Spreadsheets/Photos etc) The folders are named by the job Number. I would like to expand the standard open/save dialog with a combobox which searches for jobfolders based on tags from the database, so that whatever my users are doing they can easily find their way to the correct jobfolder to find/save their work Connecting to the database and providing the functionality to search is no problem, but is there a way to add a combobox control (ideally with a keypress/keydown event) to the dialog? Or Create my own dialog and have it called/used in place of the standard one? i.e. from ANY app my dialog would be called allowing easy access to the jobfolders. If they are in outlook they can find a jobfolder quickly, if there are using Notepad they can still find the folder easily. This would mean a new unified way of finding jobfolders from any app. Ideally someone would know a way using VB/VB.net/C# but I'm guessing, if its possible, its probably going to be C++.

    Read the article

  • Apprequest Dialog stopped working (FB-AS3 API)

    - by warran
    I'm writing ActionScript game and wanted to integrate it with FB, so I used http://code.google.com/p/facebook-actionscript-api/ with custom dialog function I've found in same issue thread. It goes like this: protected function dialog(method:String, callback:Function, stageReference:Stage, stageWebView:StageWebView, params:* = null):void { dialogCallback = callback; stageRef = stageReference; webView = stageWebView; webView.stage = stageReference; webView.assignFocus(); dialogWindow = new DialogWindow(handleDialog); dialogWindow.open(method, applicationId, webView, params); } I've written module to handle all the FB stuff and it worked perfectly. But few days ago I've noticed that dialog shows up, but when I select friends and try to send apprequest to them i get error: An error occurred with your app. Please try again later. API Error Code: 2 API Error Description: Service temporarily unavailable Error Message: User can't send this request: Unknown error I've checked it, and found out, that after selecting friends and clicking send dialog changes location to http://www.facebook.com/dialog/apprequest, the error occures, and than after clicking "ok" it changes location to redirect_uri. Do you have any ideas? Is this my fault or facebooks'?

    Read the article

  • How to start an activity Dialog.

    - by PP
    I have one activity which i am using for displaying Dialogs and as a normal layout. So what i want to do is, sometimes i want to start activity as Theme Dialog and some times using setContentView. I can't use <activity android:theme="@android:style/Theme.Dialog"> in manifest file as it will always display activity as dialog. So can we do it programmatic, i have also tried setTheme() method but it did't work. Thanks, PP.

    Read the article

  • Fb.Login() does not popup OAuth Dialog?

    - by cnz81
    I'm study fb api recently and I use fb api to do login, however, when I use Fb.Login() method, and scope the permission that I needed. I found the problem that when I use account ( this account is also the fb app admin ) to login, everything is be work including login dialog and oauth dialog , but when I use another account ( General account ) the login dialog is work but OAuth Dialog is not work . I've tried another account ( General account ), it had the same situation, Only when I use the account which is also the fb app owner account would be work. Any Ideas ? Below is the code... FB.login(function (response) { if (response.authResponse) { alert('success !') ; } else { alert(' faild ! '); } }, { scope: "publish_actions" });

    Read the article

  • Missing "log on to" field in Windows 2008 password change dialog

    - by Dmitri Chubarov
    I have to setup an embedded standalone CIFS server outside of domain environment. I shall refer to the server as storage_gateway. The default password setting for the Administrator account is Password must be changed. Until Administrator password is changed other local accounts are disabled. While the server is on default password connecting to a share causes fails with NT_STATUS_PASSWORD_MUST_CHANGE error. $ smbclient -L //storage_gateway -U Administrator session setup failed: NT_STATUS_PASSWORD_MUST_CHANGE I have a mixed Linux/Windows environment and prefer smbclient for diagnostics. To change the password in Windows 2003 Server I could press CTRL-ALT-DEL to get into the Windows Security window and change password for the remote server specifying the server name or ip address (xx.xx.xx.xx) in the system password change dialog. (the name root is just an example, I have edited the dialogs to translate them) However in Windows 2008 the corresponding dialog lacks the Log on to field. Is there a way to change a remote password in Windows 2008 Server/Windows 7?

    Read the article

  • Black GUI with minimal desktop icons appeared after powering on my desktop PC

    - by Christopher Chipps
    My computer powered on fine but after POST, a dialog box appeared with a red "X" and it gave some sort of warning. It had a long file name, I cannot recollect the entirety of it but it was something like C:/system32/desktop....After clicking ok, the GUI was totally black with only the Recycle Bin icon in the Desktop, and the Taskbar was there as well. I restarted it, and the GUI was back to normal with the icons and wallpaper in their proper place. I'm sure if I knew more of that file name in the dialog box, that would be helpful to those reading this but should I be concerned that this happened?

    Read the article

  • Winamp jump dialog

    - by bobobobo
    In the most recent build of Winamp, either the Jump dialog has been ruined or there's some hidden "advanced" setting that i'm missing. The Jump dialog used to have a few options, like "Jump to file and play" "Jump to file without playing" "Queue file to start playing next, after this song finishes" But now it only shows (CANCEL) as the only button, and you can press enter on a file to start play. What happened to the JUMP & QUEUE feature? I want to jump to a file, but QUEUE it to be played next, not play it immediately.

    Read the article

  • Firefox and TinyMCE 3.4.9 won't play nice together

    - by Patricia
    I've submitted a bug to the tinyMCE people, but i'm hoping someone else has come across this and has a suitable workaround. Here's the situation: I've got a form with a tinyMCE control that i load into a jquery dialog. it works great the first time, then after they close it, and open a new one. any interaction with the tinyMCE control gives: "Node cannot be used in a document other than the one in which it was created" it also doesn't fill the control with the text it's supposed to be prepopulated with. In my jquery dialogs i have the following scripts in my beforeClose handler: if (typeof tinyMCE != 'undefined') { $(this).find(':tinymce').each(function () { var theMce = $(this); tinyMCE.execCommand('mceFocus', false, theMce.attr('id')); tinyMCE.execCommand('mceRemoveControl', false, theMce.attr('id')); $(this).remove(); }); } and here's my tinyMCE setup script: $('#' + controlId).tinymce({ script_url: v2ScriptPaths.TinyMCEPath, mode: "none", elements: controlId, theme: "advanced", plugins: "paste", paste_retain_style_properties: "*", theme_advanced_toolbar_location: "top", theme_advanced_buttons1: "bold, italic, underline, strikethrough, separator, justifyleft, justifycenter, justifyright, justifyfull, indent, outdent, separator, undo, redo, separator, numlist, bullist, hr, link, unlink,removeformat", theme_advanced_buttons2: "fontsizeselect, forecolor, backcolor, charmap, pastetext,pasteword,selectall, sub, sup", theme_advanced_buttons3: "", language: v2LocalizedSettings.languageCode, gecko_spellcheck : true, onchange_callback: function (editor) { tinyMCE.triggerSave(); }, setup: function (editor) { editor.onInit.add(function (editor, event) { if (typeof v2SetInitialContent == 'function') { v2SetInitialContent(); } }) } }); is there anything obvious here? i've got all that complicated removal stuff in the close b/c tinymce doesn't like having it's html removed without it being removed. the setInitialContent() stuff is just so i can pre-load it with their email signature if they have one. it's broken with or without that code so that's not the problem. i was forced to update to 3.4.9 because of this issue: http://www.tinymce.com/forum/viewtopic.php?id=28400 so if someone can solve that, it would help this situation to. I have tried the suggestion from aknosis with no luck. EDIT: I originally thought this only affected firefox 11, but i have downloaded 10, and it is also affected. EDIT: Ok, i've trimmed down all my convoluted dynamic forms and links that cause this into a fairly simple example. the code for the base page: <a href="<%=Url.Action(MVC.Temp.GetRTEDialogContent)%>" id="TestSendEmailDialog">Get Dialog</a> <div id="TestDialog"></div> <script type="text/javascript"> $('#TestSendEmailDialog').click(function (e) { e.preventDefault(); var theDialog = buildADialog('Test', 500, 800, 'TestDialog'); theDialog.dialog('open'); theDialog.empty().load($(this).attr('href'), function () { }); }); function buildADialog(title, height, width, dialogId, maxHeight) { var customDialog = $('#' + dialogId); customDialog.dialog('destory'); customDialog.dialog({ title: title, autoOpen: false, height: height, modal: true, width: width, close: function (ev, ui) { $(this).dialog("destroy"); $(this).empty(); }, beforeClose: function (event, ui) { if (typeof tinyMCE != 'undefined') { $(this).find(':tinymce').each(function () { var theMce = $(this); tinyMCE.execCommand('mceFocus', false, theMce.attr('id')); tinyMCE.execCommand('mceRemoveControl', false, theMce.attr('id')); $(this).remove(); }); } } }); return customDialog; } </script> and the code for the page that is loaded into the dialog: <form id="SendAnEmailForm" name="SendAnEmailForm" enctype="multipart/form-data" method="post"> <textarea cols="50" id="MessageBody" name="MessageBody" rows="10" style="width: 710px; height:200px;"></textarea> </form> <script type="text/javascript"> $(function () { $('#MessageBody').tinymce({ script_url: v2ScriptPaths.TinyMCEPath, mode: "exact", elements: 'MessageBody', theme: "advanced", plugins: "paste, preview", paste_retain_style_properties: "*", theme_advanced_toolbar_location: "top", theme_advanced_buttons1: "bold, italic, underline, strikethrough, separator, justifyleft, justifycenter, justifyright, justifyfull, indent, outdent, separator, undo, redo, separator, numlist, bullist, hr, link, unlink,removeformat", theme_advanced_buttons2: "fontsizeselect, forecolor, backcolor, charmap, pastetext,pasteword,selectall, sub, sup, preview", theme_advanced_buttons3: "", language: 'EN', gecko_spellcheck: true, onchange_callback: function (editor) { tinyMCE.triggerSave(); } }); }); </script> a very interesting thing i noticed, if i move the tinyMCE setup into the load callback, it seems to work. this isn't really a solution though, because when i'm loading dialogs, i don't know in the code ahead of time if it has tinyMCE controls or not!

    Read the article

  • facebook iframe stream.Publish cannot close dialog or skip

    - by fooyee
    am pulling my hair over this :( spent 10 hrs but nothing came out I read this thread http://forum.developers.facebook.com/viewtopic.php?pid=198128 but it didn't help much. I'm running a local dev App Engine server ( localhost:8080 ) iframe app so I have a couple of problems. 1) on safari 4.0.4, the publish story dialog comes up nicely with all images/data/action_links. upon posting a story (or skipping), the dialog goes blank and wouldn't close. 2) I tested the same code on firefox 3.5.8, the dialog comes up with all images/data/action_links, but then the whole thing freezes. Clicking anywhere on the dialog doesn't help at all. If i'm patient enough and click "publish", I have to wait for abt 10 seconds before the dialog says "story is published". then it freezes. (clicking on skip doesn't make a difference). btw, there is no "button clicking effect" : ie: the buttons don't look like they "sink down" upon clicking. I checked the firefox memory using the command "top" on the terminal, it all seems okay, no spike in CPU processes ( i could open other firefox tabs and work on them) My futile attempts at solving the problems... 1) so i thought, hmm could this be because of local dev (localhost) problem? I uploaded the code to the production server, the same thing happens. 2) I tried an older firefox (3.1) and the same problem persisted ( the freezing ) 3) I noticed that i kind of used 2 different FB features ( Connect and XFBML). The Connect Feature I used in the PostStory function. The XFBML feature I used before the tag. So I thought, hmm ... I tried replacing the FB_RequireFeatures["Connect"] feature with FB_RequireFeatures["XFBML"]. nothing changed. I still can't close the story dialog. 4) Is there a possibility that I didn't connect to xd_receiver.htm properly? my xd_receiver.htm is stored in my folder /media/fbconnect in my app.yaml handler: - url: /fbconnect static_dir: media/fbconnect so i thought a connection has to be established with xd_receiver.htm. any way I can test that? here're all the codes: <script type="text/javascript"> //post story function function PostStory() { //init facebook FB_RequireFeatures(["Connect"], function() { FB.Facebook.init('my_app_key', "/fbconnect/xd_receiver.htm"); FB.ensureInit(function() { var message = 'the message'; var attachment = { 'name': 'a simple app to send gifts', 'href': 'http://apps.facebook.com/my_app_name', 'caption': '{*actor*} sent u something', 'description': 'some description', "media": [{ "type": "image", "src": "http://bit.ly/105QYr", "href": "http://bit.ly/105QYr"}] }; //action links can only be seen AFTER the feed is published var action_links = [{ 'text': 'Send him/her a gift back!', 'href': 'http://somelink.com'}]; FB.Connect.streamPublish(message, attachment, action_links, null, "Share the gift with your friends", callback, false, null); }); }); function callback(post_id, exception) { //alert('Wall Post Complete'); } } </script> just before the end of the /body tag, i have this: <script type="text/javascript"> function callFBInit() { FB_RequireFeatures( ["XFBML"], function(){ FB.Facebook.init("my_app_key", "/fbconnect/xd_receiver.htm"); } ); } callFBInit(); btw, my xd_receiver.htm contains: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns=? http://www.w3.org/1999/xhtml? > <head> <title>cross-domain receiver page</title> </head> <body> <script src=?http://static.ak.facebook.com/js/api_lib/v0.4/xdcommreceiver.debug.js? type=? text/javascript? ></script> </body> </html> hope you guys can help out. thx

    Read the article

  • WPF: How to specify units in Dialog Units?

    - by Ian Boyd
    i'm trying to figure out how to layout a simple dialog in WPF using the proper dialog units (DLUs). i spent about two hours dimensioning this sample dialog box from Windows Vista with the various dlu measurements. Can someone please give the corresponding XAML markup that generates this dialog box? (Image Link) Now admittedly i know almost nothing about WPF XAML. Every time i start, i get stymied because i cannot figure out how to place any control. It seems that everything in WPF must be contained on a panel of some kind. There's StackPanels, FlowPanels, DockPanel, Grid, etc. If you don't have one of these then it won't compile. The only XAML i've been able to come up with (uing XAMLPad) so far: <DockPanel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Image Width="23" /> <Label>Are you sure you want to move this file to the Recycle Bin?</Label> <Image Width="60" /> <Label>117__6.jpg</Label> <Label>Type: ACDSee JPG Image</Label> <Label>Rating: Unrated</Label> <Label>Dimensions: 1072 × 712</Label> <Button Content="Yes" Width="50" Height="14"/> <Button Content="Cancel" Width="50" Height="14"/> </DockPanel> Which renders as a gaudy monstrosity. None of the controls are placed or sized right. i cannot figure out how to position controls in a window, nor size them properly. Can someone turn that screenshot into XAML? Note: You're not allowed to measure the screenshot. All the Dialog Unit (dlu) widths and heights are specified. Note: 1 horizontal DLU != 1 vertical DLU. Horizontal and vertical DLUs are different sizes. Links Microsoft User Experience Guidelines: Recommended sizing and spacing Microsoft User Experience Guidelines: Layout Metrics Bump: 2011/05/14 (15 months later)

    Read the article

  • dialog.show() crashes my application, why?

    - by user1739462
    I'm new in adroid. I like to do things when the color reach a value. I like (for example) show the alert if r is bigger than 30, but the application go in crash. Thank for very simple answares. public class MainActivity extends Activity { private AlertDialog dialog; private AlertDialog.Builder builder; private BackgroundColors view; public class BackgroundColors extends SurfaceView implements Runnable { public int grand=0; public int step=0; private boolean flip=true; private Thread thread; private boolean running; private SurfaceHolder holder; public BackgroundColors(Context context) { super(context); } Inside this loop while running is true. is impossible to show dialogs ?? public void run() { int r = 0; while (running){ if (holder.getSurface().isValid()){ Canvas canvas = holder.lockCanvas(); if (r > 250) r = 0; r += 10; if (r>30 && flip){ flip=false; // ********************************* dialog.show(); // ********************************* // CRASH !! } try { Thread.sleep(300); } catch(InterruptedException e) { e.printStackTrace(); } canvas.drawARGB(255, r, 255, 255); holder.unlockCanvasAndPost(canvas); } } } public void start() { running = true; thread = new Thread(this); holder = this.getHolder(); thread.start(); } public void stop() { running = false; boolean retry = true; while (retry){ try { thread.join(); retry = false; } catch(InterruptedException e) { retry = true; } } } public boolean onTouchEvent(MotionEvent e){ dialog.show(); return false; } protected void onSizeChanged(int xNew, int yNew, int xOld, int yOld){ super.onSizeChanged(xNew, yNew, xOld, yOld); grand = xNew; step =grand/15; } } public void onCreate(Bundle b) { super.onCreate(b); view = new BackgroundColors(this); this.setContentView(view); builder = new AlertDialog.Builder(this); builder.setMessage("ciao"); builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { Log.d("Basic", "It worked"); } }); dialog = builder.create(); } public void onPause(){ super.onPause(); view.stop(); } public void onResume(){ super.onResume(); view.start(); } }

    Read the article

  • CSS style to create an HTML with an image on left and input text boxes on right that fills all space

    - by dafi
    I need to create an HTML page (a JqueryUI dialog but this isn't the problem) containing an image on left (size is fixed to 75x75) and on right some input text boxes, input boxes must resize to all remaining space. You can see an example at http://img683.imageshack.us/img683/5412/19483174.jpg The problem is that when I resize the dialog controls move under image as shown at http://img510.imageshack.us/img510/4817/44749696.jpg How can I resolve this problem in all browser and if possible using only CSS? Below I show my HTML code and the CSS I'm using HTML code <div id="dialog-form" title="Modify Post"> <form action=""> <fieldset> <img id="dialog-modify-thumb" src="http://dummyimage.com/75x75/000/fff" alt="" width="75" height="75"/> <div id="dialog-modify-controls"> <label for="dialog-modify-caption">Caption</label> <input type="text" name="dialog-modify-caption" id="dialog-modify-caption"/> <br/> <label for="dialog-modify-tags">Tags</label> <input type="text" name="dialog-modify-tags" id="dialog-modify-tags"/> <br/> <label for="dialog-modify-publish-date">Publish Date</label> <input type="text" name="dialog-modify-publish-date" id="dialog-modify-publish-date"/> </div> </fieldset> </form> </div> The CSS #dialog-modify-thumb { margin-right: 3px; border: 1px solid; display: block; float:left; } #dialog-form input[type='text'] { width: 100%; } #dialog-modify-controls { float: right; width:100%; }

    Read the article

  • Explorer and open file dialog not responding (Vista)

    - by rohancragg
    Any explorer window opened for the first time on my machine causes the explorer window to display the folders tree and folder path in the address bar immediately but the file/folder list pane is blank and the window displays 'Not Responding' in the title bar, this hangs for up to a minute or more. Any file dialog displays 'Not Responding' in the title bar. The files list is eventually displayed after a few seconds or more. Steps to repro: Close all open instances of explorer Windows Key | Run | [enter a folder path such as 'c:\temp'] Or within any app: use a file open / save dialog Once there is at least one open instance of explorer the performance is still fairly poor but not nearly so bad and file lists are displayed in a timely fashion. What I've tried: Cleaned up registry with CCleaner tool, and uninstalled all other unused software Checked nothing unwanted running at startup with Autoruns Removed any ISO burner/recorder/mount software Still to try Get latest version of everything - especially stuff with shell extension behaviour such as TortoiseSVN Anyone have any other suggestions? Thanks alot. Update I'm wondering if this is related, I'll try the hotfix when I get home and report back: KB972685 - FIX:Explorer.exe hangs when using a shell extension written using MFC Update 2 Before I got a chance to try the hotfix it seems one of the above actions fixed this for me; either the removal of IsoRecorder or TortoiseHg (which I was no longer using anyway). Update 3 A similar issue with Explorer.exe has come back since installing TortoiseHg 1.01 :-(

    Read the article

  • XP Client for NFS failure dialog on startup, but drive mapping works

    - by Matt Bennett
    I'm mounting an NFS share to some windows machines using the tools that come in the Services for UNIX Administration toolkit. I've set up the User Name Mapping service to use local passwd and group files. I had to manually start the User Name Mapping service, and then created an 'advanced map' from the XP machine's user to a uid that exists in on my NFS server, like so: Windows User: Matt Bennett UNIX Domain: PCNFS UNIX User: mattbennett UID: 10250 Primary: * I can map a network drive without any issues, and it correctly identifies the UID and GID to use, but when I reboot I get this message: "An error occurred while connecting to the NFS server. Make sure that the Client for NFS service has started. If the problem persists make sure Client for NFS service can communicate with User Name Mapping or PCNFS server." After dismissing the dialog, the machine finishes booting and the network drive is there in My Computer with the title "Disconnected Network Drive", but I can open it I can see the network share without a problem, and then it drops the 'disconnected' from its title. It seems like the services are starting in the wrong order or something, so the first attempt to connect fails but subsequent ones work as expected. There don't seem to be any symptoms apart from the dialog box, but obviously something's not quite right. What have I done wrong? Thanks, Matt.

    Read the article

  • ios7 loops on the "trust this computer" dialog

    - by gcb
    trying to transfer files to the work ipad via my debian7 box. When i plug it on the computer usb port, it shows the dialog about trusting this computer, and the computer shows a gnome alert about the ipad being locked and that i should unlock it and try again. i press "trust" on the ipad and try again on gnome. and it starts again. over and over. endlessly. there are dozen threads about this on apple support forums. no solution. just dozens of "me too" flags. e.g. https://discussions.apple.com/message/23082859#23082859 (44 me-too, 2k views) here is the log/messages i get Oct 23 21:17:39 dotmatrix kernel: [ 1928.517766] usb 2-1.7: USB disconnect, device number 16 Oct 23 21:17:39 dotmatrix kernel: [ 1928.715441] usb 2-1.7: new high-speed USB device number 17 using ehci_hcd Oct 23 21:17:40 dotmatrix kernel: [ 1928.811031] usb 2-1.7: New USB device found, idVendor=05ac, idProduct=12ab Oct 23 21:17:40 dotmatrix kernel: [ 1928.811036] usb 2-1.7: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Oct 23 21:17:40 dotmatrix kernel: [ 1928.811039] usb 2-1.7: Product: iPad Oct 23 21:17:40 dotmatrix kernel: [ 1928.811041] usb 2-1.7: Manufacturer: Apple Inc. Oct 23 21:17:40 dotmatrix kernel: [ 1928.811043] usb 2-1.7: SerialNumber: fec5e0f6a6fa18a936de3c53af661051d290275e Oct 23 21:17:40 dotmatrix mtp-probe: checking bus 2, device 17: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7" Oct 23 21:17:40 dotmatrix mtp-probe: bus: 2, device: 17 was not an MTP device Oct 23 21:17:43 dotmatrix kernel: [ 1932.346505] usb 2-1.7: USB disconnect, device number 17 If i never press the trust dialog it will stay there until i remove the cable. but the logs shows that it gave up 3sec after the cable was connected.

    Read the article

  • Null Validation on EditText box in Alert Dialog - Android

    - by LordSnoutimus
    Hi, I am trying to add some text validation to an edit text field located within an alert dialog box. It prompts a user to enter in a name. I want to add some validation so that if what they have entered is blank or null, it does not do anything apart from creating a Toast saying error. So far I have: AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle("Record New Track"); alert.setMessage("Please Name Your Track:"); // Set an EditText view to get user input final EditText trackName = new EditText(this); alert.setView(trackName); alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { String textString = trackName.getText().toString(); // Converts the value of getText to a string. if (textString != null && textString.trim().length() ==0) { Context context = getApplicationContext(); CharSequence error = "Please enter a track name" + textString; int duration = Toast.LENGTH_LONG; Toast toast = Toast.makeText(context, error, duration); toast.show(); } else { SQLiteDatabase db = waypoints.getWritableDatabase(); ContentValues trackvalues = new ContentValues(); trackvalues.put(TRACK_NAME, textString); trackvalues.put(TRACK_START_TIME,tracktimeidentifier ); insertid=db.insertOrThrow(TRACK_TABLE_NAME, null, trackvalues); } But this just closes the Alert Dialog and then displays the Toast. I want the Alert Dialog to still be on the screen. Thanks

    Read the article

  • How to change theme for AlertDialog.

    - by Min Soo Kim
    Hello everyone, I was wondering if someone could help me out. I am trying to create a custom AlertDialog. In order to do this, I added the following line of code in styles.xml @drawable/color_panel_background color_panel_background.9.png is located in drawable folder. This is also available in Android SDK res folder. The following is the main activity. package com.customdialog; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.os.Bundle; public class CustomDialog extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); this.setTheme(R.style.CustomAlertDialog); AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("HELLO!"); builder .setCancelable(false) .setPositiveButton("Yes", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { //MyActivity.this.finish(); } }) .setNegativeButton("No", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { //dialog.cancel(); } }); AlertDialog alertdialog = builder.create(); alertdialog.show(); } } In order to apply the theme to an AlertDialog, I had to set the theme to the current context. However, I just can't seem to get the app to show customized AlertDialog. Can anyone help me out with this, and thank you very much in advance!

    Read the article

  • Need Sharepoint like modal pop-up window

    - by Srikanth
    I need to show Sharepoint 2010 like pop-up window when clicked on a link in grid view. Once the modal pop-up displayed and user selected the Save button data base should be updated with given values in pop-up. How can I get this. Any Idea. As of now I am using below code to get it but no idea how to pass the values to Database once clicked on the button in pop-up Note: As of now I am not adding the gridview code here as I wanted to achieve it first with sample html then wanted to do with grid view. Java Script function openDialog() { var options = { html: divModalDialogContent, // ID of the HTML tag // or HTML content to be displayed in modal dialog width: 600, height: 300, title: "My First Modal Dialog", dialogReturnValueCallback: dialogCallbackMethod, // custom callback function allowMaximize: true, showClose: true }; SP.UI.ModalDialog.showModalDialog(options); } //Results displayed if 'OK' or 'Cancel' button is clicked if the html content has 'OK' and 'Cancel' buttons function onDialogClose(dialogResult, returnValue) { if (dialogResult == SP.UI.DialogResult.OK) { alert('Ok!'); } if (dialogResult == SP.UI.DialogResult.cancel) { alert('Cancel'); } } // Custom callback function after the dialog is closed function dialogCallbackMethod() { alert('Callback method of modal dialog!'); } HTML <div id="divModalDialogContent"> Hello World! <input type="button" value="OK"onclick="SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK, 'Ok clicked'); return false;" class="ms-ButtonHeightWidth" /> <input type="button" value="Cancel"onclick="SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.cancel, 'Cancel clicked'); return false;" class="ms-ButtonHeightWidth" /> <asp:Button runat="server" ID="btnClicked" Text="Clicked" onclick="btnClicked_Click" /> <input type="button" value="Open" onclick="openDialog()" /> How can I call db upon clicking 'clicked' button in pop-up. Also I need to send parameters to pop-up Thanks in advance

    Read the article

  • How to eliminate Unhandled Exception dialog produced by 3rd party application

    - by Tappen
    I'm working with a 3rd party executable that I can't recompile (vendor is no longer available). It was originally written under .Net 1.1 but seems to work fine under later versions as well. I launch it using Process.Start from my own application (I've tried p/invoke CreateProcess as well with the same results so that's not relevant) Unfortunately this 3rd party app now throws an unhandled exception as it exits. The Microsoft dialog box has a title like "Exception thrown from v2.0 ... Broadcast Window" with the version number relating to the version of .Net it's running under (I can use a .exe.config file to target different .Net versions, doesn't help). The unhandled exception dialog box on exit doesn't cause any real problems, but is troubling to my users who have to click OK to dismiss it every time. Is there any way (a config file option perhaps) to disable this dialog from showing for an app I don't have the source code to? I've considered loading it in a new AppDomain which would give me access to the UnhandledException event but there's no indication I could change the appearence of the dialog. Maybe someone knows what causes the exception and I can fix this some other way?

    Read the article

  • Facebook IOS SDK: Error in Publish Story Dialog

    - by lividsquirrel
    I've successfully set up the "DemoApp" project from the Facebook IOS SDK to use my "OKC ThunderCast" Facebook application. I have also configured another "Tester" application from scratch to successfully use the Facebook SDK and publish stories to my news feed. However, in my production application, I always get this result when calling the "dialog" method. The full description of the error message is "Error on line 52 at column 17: Opening and ending tag mismatch: div line 0 and body" Here's a detailed walkthrough of all of my code to make sure nothing is missed. 1) A UIViewController calls the "authorize" method NSArray *fbPerms = [NSArray arrayWithObjects:@"read_stream", @"offline_access", nil]; [[FacebookSingleton sharedInstance].facebook authorize:fbPerms delegate:self]; Note: The FacebookSingleton is a class I wrote that always returns a single instance of the "Facebook" class. I am using it successfully in other applications. 2) Safari is opened and the user is successfully authenticated and authorized 3) The application is called back and the "handleOpenUrl" method is called, which calls the "fbDidLogin" method of the UIViewController - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { Facebook *fb = [FacebookSingleton sharedInstance].facebook; return [fb handleOpenURL:url]; } 4) The same UIViewController handles the "fbDidLogin" event, and calls the "dialog" method - (void)fbDidLogin { [[FacebookSingleton sharedInstance].facebook dialog:@"feed" andDelegate:self]; } I also have the necessary "URL Schemes" and "URL Types" entries in the .plist file. To my eyes, I am using exactly the same code in the "DemoApp", "Tester", and production applications. But while the DemoApp and Tester work, I always see this HTML error in the feed dialog in my production application. Has anyone seen a similar issue? Could it be related to the Facebook "Bundle ID" setting in the Facebook application settings? Is there some build or .plist setting that is different? I have invested a great deal of time into troubleshooting with no success in several weeks. Thanks in advance...

    Read the article

  • VB.NET: Dialog exits when enter pressed?

    - by Camilo Martin
    Hi all; My problem seems to be quite simple, but it's not working the intuitive way. I'm designing a Windows Forms Application, and there is a dialog that should NOT exit when the enter key is pressed, instead it has to validate data first, in case enter was pressed after changing the text of a ComboBox. I've tried by telling it what to do on KeyPress event of the ComboBox if e is the Enter key: Private Sub ComboBoxSizeChoose_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles ComboBoxSizeChoose.KeyPress If e.KeyChar = Convert.ToChar(Keys.Enter) Then Try TamanhoDaNovaFonte = Single.Parse(ComboBoxSizeChoose.Text) Catch ex As Exception Dim Dialogo2 As New Dialog2 Dialog2.ShowDialog() ComboBoxSizeChoose.Text = TamanhoDaNovaFonte End Try End If End Sub But no success so far. When the Enter key is pressed, even with the ComboBox on focus, the whole dialog is closed, returning to the previous form. The validation is NOT done at all, and it has to be done before exiting. In fact, I don't even want to exit on the form's enter KeyPress, the only purpose of the enter key on the whole dialog is to validate the ComboBox (but only when in focus, for the sake of an intuitive UI). I've also tried appending the validation to the KeyPress event of the whole dialog's form, if the key is Enter. NO SUCCESS! It's like my code wasn't there at all. What should I do? (Visual Studio 2008, VB.NET)

    Read the article

  • Unmanaged DLL (exporting Dialog) + Class Library (DLL) + no Windows Style/Themes

    - by Gohlool
    Hi, I have a managed application TestApplication.exe in C# and Application.EnableVisualStyles() is allready called. I have a Class Library MySharedCode.dll also in C# which uses [DLLImport()] to import some External dialogs out of an unmanaged dll. Well, now I am using (add reference) MySharedCode.dll in my TestApplication.exe and call a function MyTestConfigDlg() out of it. TestClass.MyTestConfigDlg(); OK, everything works fine and I get my dialog, but the dialog has NO XP style/themes? I just wanted to see if it's general problem with managed/unmanged modules, so I used the [DLLImport()] to call the same MyTestConfigDlg() dialog but this time directly in my TestApplication.exe! WOW! Worked as I expected. The Dialog was in XP Style/Themes! so, anybody here who can help me out? FYI: I also tried (just for test) to call MessageBoxA() API call in my Class Library Dll which later called by my TestApplication.exe and the MessageBoxA() had also no Style/Themes! Thanks in advance!

    Read the article

  • jQuery logic firing twice from a Usercontrol when used in a jQueryUI modal dialog

    - by AaronS
    I have an asp.net usercontrol that I'm using to put a bunch of HTML and Jquery logic into to be shared on several pages. This usercontrol has some dropdown boxes loaded from json calls and has no added codebehind logic. When I use this usercontrol on a normal page it works perfectly fine, and no issues at all. However, when I wrap the usercontrol in a div, and use a jqueryUI modal dialog, everything in the usercontrol fires twice. Not only code in the initial $(document).ready(function() {});, but also every function is also fired twice when called. Debugging this in Visual Studio, I see that everything is first being called from the external JS file, and then again from a "script block" file that is somehow getting generated on the fly. This script block file isn't getting generated on a page that doesn't wrap the user control in a modal. The same happens if I use IISExpress or IIS7. The question is, why is this script block file getting created, and why is all my jQuery logic firing twice? --edit-- Here is the div: <div id="divMyDiv" title="MyDiv"> <uc1:MyUserControl runat="server" ID="MyUsercontrol" /> </div> Here is the modal logic that uses it: $("#divMyDiv").dialog({ autoOpen: false, height: 400, width: 400, modal: true, open: function (type, data) { $(this).parent().appendTo("form"); } }); Note: The problm still occurs, even if I remove the "open:" function. But, it does not occur if I remove the entire dialog block, so it is specific to this dialog call.

    Read the article

  • How to customize file dialog in wpf

    - by ManjuAnoop
    In Windows7 I am using a customized Open File Dialog( WPF application). My Open File dialog is derived from Microsoft.Win32.CommonDialog. The dialog have old look, how to change this to new look (windows7 file dialog look(Explorer style)). Code portion: private const int OFN_ENABLESIZING = 0x00800000; private const int OFN_EXPLORER = 0x00080000; private const int OFN_ENABLEHOOK = 0x00000020; protected override bool RunDialog(IntPtr hwndOwner) { OPENFILENAME_I.WndProc proc = new OPENFILENAME_I.WndProc(this.HookProc); OPENFILENAME_I ofn = new OPENFILENAME_I(); this._charBuffer = CharBuffer.CreateBuffer(0x2000); if (this._fileNames != null) { this._charBuffer.PutString(this._fileNames[0]); } ofn.lStructSize = Marshal.SizeOf(typeof(OPENFILENAME_I)); ofn.hwndOwner = hwndOwner; ofn.hInstance = IntPtr.Zero; ofn.lpstrFilter = MakeFilterString(this._filter, this.DereferenceLinks); ofn.nFilterIndex = this._filterIndex; ofn.lpstrFile = this._charBuffer.AllocCoTaskMem(); ofn.nMaxFile = this._charBuffer.Length; ofn.lpstrInitialDir = this._initialDirectory; ofn.lpstrTitle = this._title; ofn.Flags = OFN_EXPLORER | OFN_ENABLESIZING | OFN_ENABLEHOOK; ofn.lpfnHook = proc; ofn.FlagsEx = 0x1000000 ; NativeMethods.GetOpenFileName(ofn); // } [SecurityCritical, SuppressUnmanagedCodeSecurity, DllImport("comdlg32.dll", CharSet = CharSet.Unicode, SetLastError = true)] internal static extern bool GetOpenFileName([In, Out] OPENFILENAME_I ofn);

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >