Search Results

Search found 5 results on 1 pages for 'mon4goos'.

Page 1/1 | 1 

  • Accessing "Public" methods from "Private" methods in javascript class

    - by mon4goos
    Is there a way to call "public" javascript functions from "private" ones within a class? Check out the class below: function Class() { this.publicMethod = function() { alert("hello"); } privateMethod = function() { publicMethod(); } this.test = function() { privateMethod(); } } Here is the code I run: var class = new Class(); class.test(); Firebug gives this error: publicMethod is not defined: [Break on this error] publicMethod(); Is there some other way to call publicMethod() within privateMethod() without accessing the global class variable [i.e. class.publicMethod()]?

    Read the article

  • Editing Mac OS X login items in Objective-C through AppleScript

    - by mon4goos
    In my Cocoa program, I want to examine what programs are registered to run at startup and modify that list as I feel appropriate. In order to be compatible with Tiger it seems like I need to work through AppleScript. I currently have the following code: NSDictionary* errorDict; NSAppleEventDescriptor* returnDescriptor = NULL; NSString *appleSource = @"tell application \"System Events\"\n\ get every login item\n\ end tell"; NSAppleScript *appleScript = [[NSAppleScript alloc] initWithSource: appleSource]; returnDescriptor = [appleScript executeAndReturnError: &errorDict]; If I run that command in AppleScript, I get back an array of login items. However, I can't figure out how to iterate through this array in Objective-C. More specifically, I want to examine the names and paths of the programs registered to run at startup. Any ideas?

    Read the article

  • Bring NSRunAlertPanel to Front in Background Process

    - by mon4goos
    If you call NSRunAlertPanel() from a background process in Cocoa, the dialogue does not come to the front and instead stays behind other windows. This post (http://stackoverflow.com/questions/2639479/nsrunalertpanel-shows-up-behind-the-active-window) shows that you can bring the dialogue to the front if you convert the process to a foreground process. If you keep the process a background process, however, is there any way to achieve this behavior?

    Read the article

  • Bring NSRunAlertPanel Dialogue to Front in Background Process

    - by mon4goos
    If you call NSRunAlertPanel() from a background process in Cocoa, the dialogue does not come to the front and instead stays behind other windows. This post shows that you can bring the dialogue to the front if you convert the process to a foreground process. If you keep the process a background process, however, is there any way to achieve this behavior?

    Read the article

  • LDAP "Insufficient Access"

    - by mon4goos
    I am trying to create an LDAP filter string. In each LDAP entry there is an attribute called "status" that has many values, some of which are of the regex form "[ab][0-9][1-9]". For example, "a20" or "b81". All other values for the "status" attribute are just alphabetical characters. I only want to let through entries that have a "status" value of the first form. When I construct an LDAP filter such as (status=a*) I get an "Insufficient Access" error. However, if I change the query to (status=a1*) that works fine. Is there any reason for this? If there behavior is unavoidable, can anyone thing of a way to get only the entries I want.

    Read the article

1