From developer@opengroupware.org Tue Apr 10 08:11:45 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Tue, 10 Apr 2007 09:11:45 +0200 Subject: [OGo-Developer] SkyDialNumber in LSWTableView and getting an account from a telephone number? Message-ID: <20070410071145.EC2AE39AFF@l00-bugdead-prods.de> Hi, for the AsteriskUI (http://docs.opengroupware.org/Members/buzzdee/asterisk/AsteriskUI) I used a LSWTableView, to create a table, showing the SIP Accounts, is there a way to use a SkyDialNumber Dynamic Element as a column in a LSWTable View? And second question, I have the extensions, their status, ... from the asterisk. I would like to retrieve account information on behalf of the extension, Is there an easy way to lookup account information, (name, email,... ) for a given telephone number stored in the telephones field? I have seen the person::get-telephones command, but I need it the other way around, does there exist something like this? kind regards Sebastian From developer@opengroupware.org Tue Apr 10 08:36:23 2007 From: developer@opengroupware.org (Helge Hess) Date: Tue, 10 Apr 2007 09:36:23 +0200 Subject: [OGo-Developer] SkyDialNumber in LSWTableView and getting an account from a telephone number? In-Reply-To: <20070410071145.EC2AE39AFF@l00-bugdead-prods.de> References: <20070410071145.EC2AE39AFF@l00-bugdead-prods.de> Message-ID: <51654207-9A4B-4B23-B61D-DB5D65F1AD95@opengroupware.org> On Apr 10, 2007, at 09:11, Sebastian Reitenbach wrote: > for the AsteriskUI > (http://docs.opengroupware.org/Members/buzzdee/asterisk/AsteriskUI) > I used a > LSWTableView, to create a table, showing the SIP Accounts, is there > a way to > use a SkyDialNumber Dynamic Element as a column in a LSWTable View? No. LSWTableView is deprecated, use SkyTableView instead. > And second question, I have the extensions, their status, ... from the > asterisk. I would like to retrieve account information on behalf of > the > extension, Is there an easy way to lookup account information, (name, > email,... ) for a given telephone number stored in the telephones > field? > I have seen the person::get-telephones command, but I need it the > other way > around, does there exist something like this? person::search or something. Just check what gets called by the contact search? Greets, Helge -- Helge Hess http://www.helgehess.eu/ From developer@opengroupware.org Wed Apr 11 10:19:38 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Wed, 11 Apr 2007 11:19:38 +0200 Subject: [OGo-Developer] SkyDialNumber in LSWTableView and getting an account from a telephone number? Message-ID: <20070411091938.7E3C839F7C@l00-bugdead-prods.de> developer@opengroupware.org wrote: > On Apr 10, 2007, at 09:11, Sebastian Reitenbach wrote: > > for the AsteriskUI > > (http://docs.opengroupware.org/Members/buzzdee/asterisk/AsteriskUI) > > I used a > > LSWTableView, to create a table, showing the SIP Accounts, is there > > a way to > > use a SkyDialNumber Dynamic Element as a column in a LSWTable View? > > No. LSWTableView is deprecated, use SkyTableView instead. I changed it, and have the SkyDialNumber field now working in the Table, thanks. > > person::search or something. Just check what gets called by the > contact search? thanks, I'll need to take a look at it there... kind regards Sebastian From developer@opengroupware.org Thu Apr 12 05:52:41 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Thu, 12 Apr 2007 06:52:41 +0200 Subject: [OGo-Developer] reload contents of page when clicking a tab? Message-ID: <20070412045241.D4A0839CAC@l00-bugdead-prods.de> Hi, I have the AsteriskUI that far, that it shows a list of SIP extensions and a list of parked calls. I have these lists separated by tabs. The Arrays of the parked calls and extensions are initalized in the init method of the OGoAsteriskPage.m file. When I jump between the extensions and the parkedcalls tab, then the values of the lists are not updated. not a big deal for the extensions list. But usually parked calls live only for a very short time, this list is changing very often. When I jump between e.g. MailUI and the AsteriskUI, then the Arrays are updated. Do I can force an update of the Arrays on every click of a tab? Do I can distinguish between these two arrays, and only update the Array containing the parked calls, but not the extensions? kind regards Sebastian From developer@opengroupware.org Fri Apr 13 10:56:38 2007 From: developer@opengroupware.org (Helge Hess) Date: Fri, 13 Apr 2007 11:56:38 +0200 Subject: [OGo-Developer] reload contents of page when clicking a tab? In-Reply-To: <20070412045241.D4A0839CAC@l00-bugdead-prods.de> References: <20070412045241.D4A0839CAC@l00-bugdead-prods.de> Message-ID: <94CA3C67-6581-4B8F-BAB1-4EA8BAF5D3F0@opengroupware.org> On Apr 12, 2007, at 06:52, Sebastian Reitenbach wrote: > When I jump between e.g. MailUI and the AsteriskUI, then the Arrays > are > updated. I think thats because the current page is cached in the navigation object. So it isn't reinitialized. > Do I can force an update of the Arrays on every click of a tab? Bind an action method to the tabitem and refresh the ivars you want to refresh? If you always want to refresh you can do this: - (NSArray *)myCalls { if (self->myCalls == nil) .... calculate them return self->myCalls; } - (void)sleep { [self->myClass release]; self->myCalls = nil; [super sleep]; } Its not exactly recommended because accessor methods should not have side effects, but its used that way in a lot of places nevertheless ... Greets, Helge -- Helge Hess http://www.helgehess.eu/ From developer@opengroupware.org Fri Apr 13 18:00:10 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Fri, 13 Apr 2007 19:00:10 +0200 Subject: [OGo-Developer] reload contents of page when clicking a tab? Message-ID: <20070413170010.A90323AAAB@l00-bugdead-prods.de> Hi, > > If you always want to refresh you can do this: > > - (NSArray *)myCalls { > if (self->myCalls == nil) > .... calculate them > return self->myCalls; > } > > - (void)sleep { > [self->myClass release]; self->myCalls = nil; > [super sleep]; > } > > Its not exactly recommended because accessor methods should not have > side effects, but its used that way in a lot of places nevertheless ... > works like a charm, thanks a lot. sebastian From developer@opengroupware.org Mon Apr 16 08:04:29 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Mon, 16 Apr 2007 09:04:29 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary Message-ID: <20070416070430.19C023B1CC@l00-bugdead-prods.de> Hi, I am trying to create a NSMutableDictionary. I want to store the information about Asterisk queues in it. It should look like the following: dict = { queue1 = { key1=value1; key2=value2; Agents = ( { key1=value1; key2=value2; }, { key1=value1; key2=value2; }; ); } } Adding the list of queues to the dict is no problem. but when I try to add the Agents array to each Queue, it is just doing working. I tried a lot of variations, one is shown below, but I do not get it to store it in there, must be some stupid thing I am just doing wrong ;) else { /* need to sort the output in multiple */ NSEnumerator *e; NSMutableDictionary *tmpdict; id event; tmpdict = [[NSMutableDictionary alloc] init]; e = [self->multipleReturn objectEnumerator]; while ((event = [e nextObject])) { if ([[event objectForKey:@"Event"] hasSuffix:@" QueueParams"]) { /* the queue description, their parameters */ [tmpdict takeValue:event forKey:[event objectForKey:@"Queue"]]; } else { /* queue members */ if ([[tmpdict objectForKey:[event objectForKey:@"Queue"]] objectForKey:@"Agents"] == nil) { [[tmpdict objectForKey:[event objectForKey:@"Queue"]] takeValue: [[NSMutableArray alloc] init] forKey:@"Agents"]; } [[[tmpdict objectForKey:[event objectForKey:@"Queue"]] objectForKey:@"Agents"] addObject:event]; } } any hint is very appreciated. kind regards Sebastian From developer@opengroupware.org Mon Apr 16 09:08:51 2007 From: developer@opengroupware.org (Helge Hess) Date: Mon, 16 Apr 2007 10:08:51 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary In-Reply-To: <20070416070430.19C023B1CC@l00-bugdead-prods.de> References: <20070416070430.19C023B1CC@l00-bugdead-prods.de> Message-ID: On Apr 16, 2007, at 09:04, Sebastian Reitenbach wrote: > Adding the list of queues to the dict is no problem. but when I try > to add > the Agents array to each Queue, it is just doing working. I tried a > lot of > variations, one is shown below, but I do not get it to store it in > there, > must be some stupid thing I am just doing wrong ;) > > else { > /* need to sort the output in multiple */ > NSEnumerator *e; > NSMutableDictionary *tmpdict; > id event; > tmpdict = [[NSMutableDictionary alloc] init]; > e = [self->multipleReturn objectEnumerator]; > while ((event = [e nextObject])) { > if ([[event objectForKey:@"Event"] hasSuffix:@" QueueParams"]) { > /* the queue description, their parameters */ > [tmpdict takeValue:event forKey:[event > objectForKey:@"Queue"]]; > } else { > /* queue members */ > if ([[tmpdict objectForKey:[event objectForKey:@"Queue"]] > objectForKey:@"Agents"] == nil) { > [[tmpdict objectForKey:[event objectForKey:@"Queue"]] > takeValue: > [[NSMutableArray alloc] init] forKey:@"Agents"]; > } > [[[tmpdict objectForKey:[event objectForKey:@"Queue"]] > objectForKey:@"Agents"] > addObject:event]; > } > } > > any hint is very appreciated. Can't read the code. I suppose you need to start up in the debugger (or insert NSLogs) and see whats happening? Stuff like that is a memory leak: [[tmpdict objectForKey:[event objectForKey:@"Queue"]] takeValue: [[NSMutableArray alloc] init] forKey:@"Agents"] The array will never get released. If you know that you are working on a property list (NSMutableDictionary), you might want to use -setObject:forKey: instead of -takeValue:forKey:, though it should do the same thing (if it *is* a dictionary). Greets, Helge -- Helge Hess http://www.helgehess.eu/ From developer@opengroupware.org Mon Apr 16 11:32:05 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Mon, 16 Apr 2007 12:32:05 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary Message-ID: <20070416103205.C3E8F3B23E@l00-bugdead-prods.de> Hi, > > any hint is very appreciated. > > Can't read the code. I suppose you need to start up in the debugger > (or insert NSLogs) and see whats happening? well, I'll see no other option, I thought someone with more experience see it easily what i am doing wrong here and could give me a hint. > > Stuff like that is a memory leak: > > [[tmpdict objectForKey:[event objectForKey:@"Queue"]] takeValue: > [[NSMutableArray alloc] init] forKey:@"Agents"] > > The array will never get released. I assumed that too, this was just one of my thousand tries, without luck. > > If you know that you are working on a property list > (NSMutableDictionary), you might want to use -setObject:forKey: > instead of -takeValue:forKey:, though it should do the same thing (if > it *is* a dictionary). I know it is a dictionary, I just created it before, so I'll try, maybe that works. kind regards Sebastian From developer@opengroupware.org Tue Apr 17 09:23:15 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Tue, 17 Apr 2007 10:23:15 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary Message-ID: <20070417082315.891F43B586@l00-bugdead-prods.de> Hi, I did not got it working as I wanted to work. I faked the array creation so that at least an array containing one object as I want it to be, is created. it is here in the last patch to this enhancement request: http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1864 in OGoAsteriskCommands.m in -getQueues: - (NSArray *)getQueues { NSException *exc; if ((exc = [self sendCommand:@"QueueStatus" withParameters:nil expectResult:[[[self asteriskCommands] objectForKey:@"QueueStatus"] objectForKey:@"ExpectedResult"]])) { ASSIGN(self->lastException, exc); return nil; } else { /* need to sort the output in multiple */ NSEnumerator *e; NSMutableDictionary *queuesdict; NSMutableArray *membersarray; id event; queuesdict = [[NSMutableDictionary alloc] init]; membersarray = [[NSMutableArray alloc] init]; e = [self->multipleReturn objectEnumerator]; while ((event = [e nextObject])) { if ([[event objectForKey:@"Event"] hasSuffix:@" QueueParams"]) { /* the queue description, their parameters */ NSEnumerator *f; NSEnumerator *g; id line; id value; f = [event keyEnumerator]; g = [event objectEnumerator]; while ((line = [f nextObject]) && (value = [g nextObject])) { [queuesdict takeValue:value forKey:line]; } } else { /* queue members */ [membersarray addObject:event]; } } [queuesdict takeValue:[membersarray copy] forKey:@"Agents"]; NSMutableArray *tmparray; tmparray = [[NSMutableArray alloc] init]; [tmparray addObject:queuesdict]; [self->multipleReturn removeAllObjects]; ASSIGN(self->multipleReturn, [tmparray copy]);; } return self->multipleReturn; } in the beginning of getQueues, the array self->multipleReturn is set via the [self sendCommand:@"QueueStatus" ... As the slf->multipleReturn contains an unordered list of objects, mixed up information about queues and their agents, I want to make it more ordered so that it looks like this: queues = ( { queue = "queuename"; servicelevel = "servicelevel"; value = "key"; Agents = ( location = "101"; blah = "plonk"; ); }, { another queue... } ) my initial plan was to enumerate over the self->multipleReturn array, stuff everything into a dictionary, and then put the dictionary into an array. NSMutableDictionary queuesdict; queuesdict = [[NSMutableDictionary alloc] init]; e = [self->multipleReturn objectEnumerator]; while ((event = [e nextObject])) { if ([[event objectForKey:@"Event"] hasSuffix:@" QueueParams"]) { /* the queue description, their parameters */ [queuesdict addObject:event forKey:[event objectForKey:@"Queue"]]; } else { /* queue members */ [[queuesdict objectForKey:[event objectForKey:@"Queue"] objectForKey:@"Agents"] addObject:event]; [membersarray addObject:event]; } } but I am unable to get the Agents stuffed into the dictionary. I do not get error messages, nothing, it just does not add the Agents to the Dictionary. It seems I do not yet understand completely how Mutable dictionaries or arrays are supposed to work. Any more insights are highly appreciated. kind regards Sebastian From developer@opengroupware.org Tue Apr 17 11:57:42 2007 From: developer@opengroupware.org (Rafel Amer Ramon) Date: Tue, 17 Apr 2007 12:57:42 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary In-Reply-To: <20070417082315.891F43B586@l00-bugdead-prods.de> References: <20070417082315.891F43B586@l00-bugdead-prods.de> Message-ID: <4624A826.3040607@ruth.upc.edu> En/na Sebastian Reitenbach ha escrit: > Hi, > > I did not got it working as I wanted to work. I faked the array creation so > that at least an array containing one object as I want it to be, is created. > > it is here in the last patch to this enhancement request: > http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1864 > in OGoAsteriskCommands.m in -getQueues: > > - (NSArray *)getQueues { > NSException *exc; > if ((exc = [self sendCommand:@"QueueStatus" > withParameters:nil > expectResult:[[[self asteriskCommands] > objectForKey:@"QueueStatus"] objectForKey:@"ExpectedResult"]])) { > ASSIGN(self->lastException, exc); > return nil; > } > else { > /* need to sort the output in multiple */ > NSEnumerator *e; > NSMutableDictionary *queuesdict; > NSMutableArray *membersarray; > id event; > queuesdict = [[NSMutableDictionary alloc] init]; > membersarray = [[NSMutableArray alloc] init]; > e = [self->multipleReturn objectEnumerator]; > while ((event = [e nextObject])) { > if ([[event objectForKey:@"Event"] hasSuffix:@" QueueParams"]) { > /* the queue description, their parameters */ > NSEnumerator *f; > NSEnumerator *g; > id line; > id value; > > f = [event keyEnumerator]; > g = [event objectEnumerator]; > while ((line = [f nextObject]) && (value = [g nextObject])) { > [queuesdict takeValue:value forKey:line]; > } > } else { > /* queue members */ > [membersarray addObject:event]; > } > } > [queuesdict takeValue:[membersarray copy] forKey:@"Agents"]; > NSMutableArray *tmparray; > tmparray = [[NSMutableArray alloc] init]; > [tmparray addObject:queuesdict]; > [self->multipleReturn removeAllObjects]; > ASSIGN(self->multipleReturn, [tmparray copy]);; > } > return self->multipleReturn; > } > > > in the beginning of getQueues, the array self->multipleReturn is set via the > [self sendCommand:@"QueueStatus" ... > > As the slf->multipleReturn contains an unordered list of objects, mixed up > information about queues and their agents, I want to make it more ordered so > that it looks like this: > > queues = ( > { > queue = "queuename"; > servicelevel = "servicelevel"; > value = "key"; > Agents = ( > location = "101"; > blah = "plonk"; > ); > }, > { > another queue... > } > > ) > > my initial plan was to enumerate over the self->multipleReturn array, stuff > everything into a dictionary, and then put the dictionary into an array. > NSMutableDictionary queuesdict; > queuesdict = [[NSMutableDictionary alloc] init]; > e = [self->multipleReturn objectEnumerator]; > while ((event = [e nextObject])) { > if ([[event objectForKey:@"Event"] hasSuffix:@" QueueParams"]) { > /* the queue description, their parameters */ > [queuesdict addObject:event forKey:[event objectForKey:@"Queue"]]; > } else { > /* queue members */ > [[queuesdict objectForKey:[event objectForKey:@"Queue"] > objectForKey:@"Agents"] addObject:event]; > [membersarray addObject:event]; > } > } > > > but I am unable to get the Agents stuffed into the dictionary. I do not get > error messages, nothing, it just does not add the Agents to the Dictionary. > It seems I do not yet understand completely how Mutable dictionaries or > arrays are supposed to work. > Any more insights are highly appreciated. > > kind regards > Sebastian > > Sebastian, can you send an example of the initial values of self->multipleReturn and the desired final values? Regards R. Amer Thecnical University of Catalonia -- Aquest missatge ha estat analitzat per MailScanner a la cerca de virus i d'altres continguts perillosos, i es considera que està net. For all your IT requirements visit: http://www.transtec.co.uk From developer@opengroupware.org Tue Apr 17 13:26:13 2007 From: developer@opengroupware.org (Adam Tauno Williams) Date: Tue, 17 Apr 2007 08:26:13 -0400 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary In-Reply-To: <4624A826.3040607@ruth.upc.edu> References: <20070417082315.891F43B586@l00-bugdead-prods.de> <4624A826.3040607@ruth.upc.edu> Message-ID: <1176812773.4994.4.camel@aleph.whitemice.org> --=-ytTWwbuPpWMdlWKSAK2Q Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > > my initial plan was to enumerate over the self->multipleReturn array, s= tuff=20 > > everything into a dictionary, and then put the dictionary into an array= . > > NSMutableDictionary queuesdict; > > queuesdict =3D [[NSMutableDictionary alloc] init]; > > e =3D [self->multipleReturn objectEnumerator]; > > while ((event =3D [e nextObject])) { > > if ([[event objectForKey:@"Event"] hasSuffix:@" QueueParams"]) { > > /* the queue description, their parameters */ > > [queuesdict addObject:event forKey:[event objectForKey:@"Queue"= ]]; > > } else { > > /* queue members */ > > [[queuesdict objectForKey:[event objectForKey:@"Queue"]=20 > > objectForKey:@"Agents"] addObject:event]; > > [membersarray addObject:event]; > > } > > } > > but I am unable to get the Agents stuffed into the dictionary. I do not= get=20 > > error messages, nothing, it just does not add the Agents to the Diction= ary. > > It seems I do not yet understand completely how Mutable dictionaries or= =20 > > arrays are supposed to work. > > Any more insights are highly appreciated. Have you tried adding some log messages to see if you actually end up within your while/if statements as you expect? =20 Most while statements I've seen using an NSEnumerator look like - while ((o =3D [enumerator nextObject]) !=3D nil) { } --=-ytTWwbuPpWMdlWKSAK2Q Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBGJLzkLRePpNle04MRAhX7AJ9aE0HCic0t3OrLyP2tTG6m1100PwCeLC2+ OjcNGcmOVs77JzpDfQuZ26w= =Bryz -----END PGP SIGNATURE----- --=-ytTWwbuPpWMdlWKSAK2Q-- From developer@opengroupware.org Tue Apr 17 13:32:43 2007 From: developer@opengroupware.org (Helge Hess) Date: Tue, 17 Apr 2007 14:32:43 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary In-Reply-To: <1176812773.4994.4.camel@aleph.whitemice.org> References: <20070417082315.891F43B586@l00-bugdead-prods.de> <4624A826.3040607@ruth.upc.edu> <1176812773.4994.4.camel@aleph.whitemice.org> Message-ID: <5EFB430B-C500-408C-8943-33CEC586E587@opengroupware.org> On Apr 17, 2007, at 14:26, Adam Tauno Williams wrote: > while ((o = [enumerator nextObject]) != nil) The != nil is not necessary but considered good style. In C everything != 0 is true and nil is just a regular NULL ptr casted to id. Greets, Helge -- Helge Hess http://www.helgehess.eu/ From developer@opengroupware.org Tue Apr 17 13:35:31 2007 From: developer@opengroupware.org (Adam Tauno Williams) Date: Tue, 17 Apr 2007 08:35:31 -0400 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary In-Reply-To: <5EFB430B-C500-408C-8943-33CEC586E587@opengroupware.org> References: <20070417082315.891F43B586@l00-bugdead-prods.de> <4624A826.3040607@ruth.upc.edu> <1176812773.4994.4.camel@aleph.whitemice.org> <5EFB430B-C500-408C-8943-33CEC586E587@opengroupware.org> Message-ID: <1176813331.4994.15.camel@aleph.whitemice.org> --=-fwSDk1DQ66Bo+pdYHWw7 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > nil is just a regular NULL ptr casted to id. Ah! --=-fwSDk1DQ66Bo+pdYHWw7 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBGJL8TLRePpNle04MRAok6AJ4vgC3c7Xq433lQPbW5K4rdS1GE/gCfRFEA CbyjY5s1Wk08YD4JP42nIyU= =UrQJ -----END PGP SIGNATURE----- --=-fwSDk1DQ66Bo+pdYHWw7-- From developer@opengroupware.org Tue Apr 17 13:45:08 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Tue, 17 Apr 2007 14:45:08 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary Message-ID: <20070417124508.E4FE33B62C@l00-bugdead-prods.de> Hi Rafel, > > can you send an example of the initial values of self->multipleReturn > and the desired final values? > my initial array looks like this: Apr 17 14:14:57 ogo-webui-1.1 [23380]: self->multipleReturn: ( { Abandoned = " 0"; Calls = " 0"; Completed = " 0"; Event = " QueueParams"; Holdtime = " 0"; Max = " 0"; Queue = " l00-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Weight = " 0"; }, { Abandoned = " 0"; Calls = " 0"; CallsTaken = " 0"; Completed = " 0"; Event = " QueueMember"; Holdtime = " 0"; LastCall = " 0"; Location = " Agent/303"; Max = " 0"; Membership = " static"; Paused = " 0"; Penalty = " 1"; Queue = " l00-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Status = " 4"; Weight = " 0"; }, { Abandoned = " 0"; Calls = " 0"; CallsTaken = " 0"; Completed = " 0"; Event = " QueueMember"; Holdtime = " 0"; LastCall = " 0"; Location = " Agent/202"; Max = " 0"; Membership = " static"; Paused = " 0"; Penalty = " 0"; Queue = " l00-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Status = " 4"; Weight = " 0"; }, { Abandoned = " 0"; Calls = " 0"; CallsTaken = " 0"; Completed = " 0"; Event = " QueueMember"; Holdtime = " 0"; LastCall = " 0"; Location = " Agent/101"; Max = " 0"; Membership = " static"; Paused = " 0"; Penalty = " 0"; Queue = " l00-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Status = " 4"; Weight = " 0"; } ) the array above contains all events mixed up, these are QueueParams, and QueueMember. I want it to be separated by queue params objects, where the members of the given queue are added in the Agents Key, where agents is an array. The above example array only contains one object Event QueueParams, but there could be more than one. The members are associated to the Queues via the Queue parameters. and I want it to look like this one here: self->multipleReturn: ( { Abandoned = " 0"; Calls = " 0"; Completed = " 0"; Event = " QueueParams"; Holdtime = " 0"; Max = " 0"; Queue = " l00-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Weight = " 0"; Members = ( { Abandoned = " 0"; Calls = " 0"; CallsTaken = " 0"; Completed = " 0"; Event = " QueueMember"; Holdtime = " 0"; LastCall = " 0"; Location = " Agent/303"; Max = " 0"; Membership = " static"; Paused = " 0"; Penalty = " 1"; Queue = " l00-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Status = " 4"; Weight = " 0"; }, { Abandoned = " 0"; Calls = " 0"; CallsTaken = " 0"; Completed = " 0"; Event = " QueueMember"; Holdtime = " 0"; LastCall = " 0"; Location = " Agent/202"; Max = " 0"; Membership = " static"; Paused = " 0"; Penalty = " 0"; Queue = " l00-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Status = " 4"; Weight = " 0"; }, { Abandoned = " 0"; Calls = " 0"; CallsTaken = " 0"; Completed = " 0"; Event = " QueueMember"; Holdtime = " 0"; LastCall = " 0"; Location = " Agent/101"; Max = " 0"; Membership = " static"; Paused = " 0"; Penalty = " 0"; Queue = " l00-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Status = " 4"; Weight = " 0"; } ); } ) I am not sure whether an array is the best choice to store the queues in it, but at least it fits best with the rest of the OGoAsteriskUI that is working so far. So I am open for any suggestion, I'd also drop the idea to store it in a array and use a dictionary instead... kind regards Sebastian From developer@opengroupware.org Tue Apr 17 21:36:36 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Tue, 17 Apr 2007 22:36:36 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary Message-ID: <20070417203636.731003B7C8@l00-bugdead-prods.de> Hi all, > > > It seems I do not yet understand completely how Mutable dictionaries or > > > arrays are supposed to work. > > > Any more insights are highly appreciated. > > Have you tried adding some log messages to see if you actually end up > within your while/if statements as you expect? > as the output of the NSLog statements are a bit longer, I uploded them to the docs plone: http://docs.opengroupware.org/Members/buzzdee/asterisk/arrayproblem/document_view I do not even understand why the [tmparray addObject:event] does not do work there, as I would just expect it to add the event to the array, but I don't get it, what's wrong. kind regards Sebastian From developer@opengroupware.org Wed Apr 18 09:28:22 2007 From: developer@opengroupware.org (Rafel Amer Ramon) Date: Wed, 18 Apr 2007 10:28:22 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary In-Reply-To: <20070417124508.E4FE33B62C@l00-bugdead-prods.de> References: <20070417124508.E4FE33B62C@l00-bugdead-prods.de> Message-ID: <4625D6A6.1050805@ruth.upc.edu> This is a multi-part message in MIME format. --------------070703030004000202040501 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit En/na Sebastian Reitenbach ha escrit: > Hi Rafel, > > >> can you send an example of the initial values of self->multipleReturn >> and the desired final values? >> >> > > my initial array looks like this: > > Apr 17 14:14:57 ogo-webui-1.1 [23380]: self->multipleReturn: ( > { > Abandoned = " 0"; > Calls = " 0"; > Completed = " 0"; > Event = " QueueParams"; > Holdtime = " 0"; > Max = " 0"; > Queue = " l00-bugdead-prods-queue"; > ServiceLevel = " 0"; > ServicelevelPerf = " 0.0"; > Weight = " 0"; > }, etc... > I am not sure whether an array is the best choice to store the queues in it, > but at least it fits best with the rest of the OGoAsteriskUI that is working > so far. So I am open for any suggestion, I'd also drop the idea to store it > in a array and use a dictionary instead... > > kind regards > Sebastian > > Sebastian, I think the followin code must work: - (NSArray *)getQueues { NSException *exc; exc = [self sendCommand:@"QueueStatus" withParameters:nil expectResult:[[[self asteriskCommands] objectForKey:@"QueueStatus"] objectForKey:@"ExpectedResult"]]; if(exc) { ASSIGN(self->lastException, exc); return nil; } NSEnumerator *e; NSMutableDictionary *queuesdict; NSMutableArray *membersarray; id event; queuesdict = [[NSMutableDictionary alloc] initWithCapacity:8]; membersarray = [[NSMutableArray alloc] initWithCapacity:8]; e = [self->multipleReturn objectEnumerator]; while ((event = [e nextObject]) != nil) { if ([[event objectForKey:@"Event"] hasSuffix:@" QueueParams"]) { [queuesdict addEntriesFromDictionary:event]; } else { [membersarray addObject:event]; } } [queuesdict setObject:[membersarray retain] forKey:@"Agents"]; [self->multipleReturn release]; self->multipleReturn = [ [NSMutableArray arrayWithObject:queuesdict] retain]; return self->multipleReturn; } In fact, the final value of self->multipleReturn is an array with only one element, a dictionary. If you need that self->multipleReturn must be an array, I think that's ok, but it also could be a dictionary or a variable of type id initially containing an array and finally containing a dictionary. Kind regards, Rafel. -- Aquest missatge ha estat analitzat per MailScanner a la cerca de virus i d'altres continguts perillosos, i es considera que està net. For all your IT requirements visit: http://www.transtec.co.uk --------------070703030004000202040501 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit En/na Sebastian Reitenbach ha escrit:
Hi Rafel,

  
can you send an example of the initial values of self->multipleReturn
and the desired final values?

    

my initial array looks like this:

Apr 17 14:14:57 ogo-webui-1.1 [23380]: self->multipleReturn: (
    {
        Abandoned = " 0";
        Calls = " 0";
        Completed = " 0";
        Event = " QueueParams";
        Holdtime = " 0";
        Max = " 0";
        Queue = " l00-bugdead-prods-queue";
        ServiceLevel = " 0";
        ServicelevelPerf = " 0.0";
        Weight = " 0";
    },  etc...
I am not sure whether an array is the best choice to store the queues in it, 
but at least it fits best with the rest of the OGoAsteriskUI that is working 
so far. So I am open for any suggestion, I'd also drop the idea to store it 
in a array and use a dictionary instead...

kind regards
Sebastian

  


Sebastian,

I think the followin code must work:

- (NSArray *)getQueues {
  NSException *exc;
  exc = [self sendCommand:@"QueueStatus"
     withParameters:nil
     expectResult:[[[self asteriskCommands]
            objectForKey:@"QueueStatus"]
               objectForKey:@"ExpectedResult"]];
  if(exc) {
    ASSIGN(self->lastException, exc);
    return nil;
  }

  NSEnumerator *e;
  NSMutableDictionary *queuesdict;
  NSMutableArray *membersarray;
  id event;

  queuesdict = [[NSMutableDictionary alloc] initWithCapacity:8];
  membersarray = [[NSMutableArray alloc] initWithCapacity:8];

  e = [self->multipleReturn objectEnumerator];
  while ((event = [e nextObject]) != nil) {
    if ([[event objectForKey:@"Event"] hasSuffix:@" QueueParams"]) {
      [queuesdict addEntriesFromDictionary:event];
    } else {
      [membersarray addObject:event];
    }
  }
  [queuesdict setObject:[membersarray retain] forKey:@"Agents"];
  [self->multipleReturn release];
  self->multipleReturn = [ [NSMutableArray arrayWithObject:queuesdict] retain];
  return self->multipleReturn;
}


In fact, the final value of self->multipleReturn is an array with only one element,
a dictionary. If you need that self->multipleReturn must be an array, I think that's ok,
but it also could be a dictionary or a variable of type id initially containing an array
and finally containing a dictionary.

Kind regards,

Rafel.



--
Aquest missatge ha estat analitzat per MailScanner
a la cerca de virus i d'altres continguts perillosos,
i es considera que está net.
MailScanner agraeix a transtec Computers pel seu suport. --------------070703030004000202040501-- From developer@opengroupware.org Wed Apr 18 09:35:27 2007 From: developer@opengroupware.org (Helge Hess) Date: Wed, 18 Apr 2007 10:35:27 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary In-Reply-To: <4625D6A6.1050805@ruth.upc.edu> References: <20070417124508.E4FE33B62C@l00-bugdead-prods.de> <4625D6A6.1050805@ruth.upc.edu> Message-ID: <1126D941-ED46-4AF1-BA32-79CB2CA58BBC@opengroupware.org> On Apr 18, 2007, at 10:28, Rafel Amer Ramon wrote: > [self->multipleReturn release]; Always reset the ivar to nil after releasing, otherwise you can have an uninitialized pointer in case the next statement fails (eg due to an exception). [self->multipleReturn release]; self->multipleReturn = nil; > self->multipleReturn = [ [NSMutableArray > arrayWithObject:queuesdict] retain]; Slightly more efficient (no autorelease required): self->multipleReturn = [[NSMutableArray alloc] initWithObjects:&queuesdict count:1]; Greets, Helge -- Helge Hess http://www.helgehess.eu/ From developer@opengroupware.org Fri Apr 20 06:03:33 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Fri, 20 Apr 2007 07:03:33 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary Message-ID: <20070420050334.1F83D3BB2F@l00-bugdead-prods.de> Hi Rafel, > > I think the followin code must work: > > > > In fact, the final value of self->multipleReturn is an array with only > one element, > a dictionary. If you need that self->multipleReturn must be an array, I > think that's ok, > but it also could be a dictionary or a variable of type id initially > containing an array > and finally containing a dictionary. I too got it working for one queue by myself, I (hope) mentioned some mails ago, there can be an arbitrary number of queues (QueueParams events) where an arbitrary number of agents is assigned to each queue. So I took your suggestion and tried to enhance it to work for multiple queues: - (NSArray *)getQueues { NSException *exc; if ((exc = [self sendCommand:@"QueueStatus" withParameters:nil expectResult:[[[self asteriskCommands] objectForKey:@"QueueStatus"] objectForKey:@"ExpectedResult"]])) { ASSIGN(self->lastException, exc); return nil; } else { /* need to sort the output in multiple */ NSLog(@"self->multipleReturn after the sendCommand: %@", self->multipleReturn); NSEnumerator *e; NSMutableDictionary *queuesdict; NSMutableArray *tmparray; id event; queuesdict = [[NSMutableDictionary alloc] init]; tmparray = [[NSMutableArray alloc] init]; e = [self->multipleReturn objectEnumerator]; while ((event = [e nextObject]) != nil) { if ([[event objectForKey:@"Event"] hasSuffix:@" QueueParams"]) { /* the queue description, their parameters */ [queuesdict takeValue:event forKey:[event objectForKey:@"Queue"]]; } else { /* queue members */ [tmparray release]; if ([[queuesdict objectForKey:[event objectForKey:@"Queue"]] objectForKey:@"Agents"] != nil ) tmparray = [NSMutableArray arrayWithObject:[[queuesdict objectForKey:[event objectForKey:@"Queue"]] objectForKey:@"Agents"]]; else tmparray = [[NSMutableArray alloc] initWithCapacity:8]; [tmparray addObject:event]; [[queuesdict objectForKey:[event objectForKey:@"Queue"]] takeValue:[[NSMutableArray arrayWithObject:tmparray] retain] forKey:@"Agents"]; } } [self->multipleReturn removeAllObjects]; NSEnumerator *f; id aqueue; f = [queuesdict objectEnumerator]; while ((aqueue = [f nextObject])) [self->multipleReturn addObject:aqueue]; } return self->multipleReturn; } at least I got that far, so that [tmparray addObject:event] in the else part works and fills the tmparray. but the next line: [[queuesdict objectForKey:[event objectForKey:@"Queue"]] takeValue:[[NSMutableArray arrayWithObject:tmparray] retain] forKey:@"Agents"]; is still not working as I thought it would. After this statement, the queuesdict still only contains the QueueParams Event, but not the agents. kind regards Sebastian From developer@opengroupware.org Fri Apr 20 15:59:38 2007 From: developer@opengroupware.org (herve AKEBOUE) Date: Fri, 20 Apr 2007 15:59:38 +0100 Subject: [OGo-Developer] differents users interfaces and addons Message-ID: <496d66dd0704200759xa7c792y71ee32969eb49f2b@mail.gmail.com> ------=_Part_120259_29270129.1177081178362 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline hello world, how could i configure 2 sessions of ogo (ogo_me,ogo_mywife) with different interface of Main.html like (/usr/share/opengroupware.org1 and /usr/share/opengroupware2) thanks you very much. And how could i create a module like Project or Task. conference for exemple. ------=_Part_120259_29270129.1177081178362 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline hello world, how could i configure 2 sessions of ogo (ogo_me,ogo_mywife) with different interface of Main.html like (/usr/share/opengroupware.org1 and /usr/share/opengroupware2)

thanks you very much.

And how could i create a module like Project or Task. conference for exemple.


------=_Part_120259_29270129.1177081178362-- From developer@opengroupware.org Fri Apr 20 16:43:17 2007 From: developer@opengroupware.org (Adam Tauno Williams) Date: Fri, 20 Apr 2007 11:43:17 -0400 Subject: [OGo-Developer] differents users interfaces and addons In-Reply-To: <496d66dd0704200759xa7c792y71ee32969eb49f2b@mail.gmail.com> References: <496d66dd0704200759xa7c792y71ee32969eb49f2b@mail.gmail.com> Message-ID: <1177083797.4590.23.camel@aleph.whitemice.org> --=-Fo3jt4+iG5A0FNlR0h9f Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > hello world, how could i configure 2 sessions of ogo > (ogo_me,ogo_mywife) with different interface of Main.html like > (/usr/share/opengroupware.org1 and /usr/share/opengroupware2) I think there are scripts/instructions in the docs plone on how to do this. >=20 > And how could i create a module like Project or Task. conference for > exemple.=20 You mean develop a new application? There are several bundles in the Misc/ folder of the trunk including a "Hello World" and a HelloDB bundle - http://svn.opengroupware.org/viewcvs/trunk/Misc/?rev=3D1929 >=20 >=20 --=-Fo3jt4+iG5A0FNlR0h9f Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD4DBQBGKN+VLRePpNle04MRAnljAJjKOzuChhc9LLIgthPQGPBsAPRcAJ9I5mcH 1kW7TNc/jK/KTCi/LJauPA== =cmco -----END PGP SIGNATURE----- --=-Fo3jt4+iG5A0FNlR0h9f-- From developer@opengroupware.org Fri Apr 20 17:55:55 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Fri, 20 Apr 2007 18:55:55 +0200 Subject: [OGo-Developer] differents users interfaces and addons Message-ID: <20070420165555.D8E1F3BF8A@l00-bugdead-prods.de> Hi, developer@opengroupware.org wrote: > hello world, how could i configure 2 sessions of ogo (ogo_me,ogo_mywife) > with different interface of Main.html like (/usr/share/opengroupware.org1 > and /usr/share/opengroupware2) you can start multiple instances of ogo from one installation. You can define the parameters that both instances shall share via the Default command as the user that runs these instances. The rest that differs in the configuration, like the port of the listener (-WOPort), maybe some others too, like LSAttachmentPath. or the database connection, whatever you need ... you specify as command line parameter to the ogo instance. > And how could i create a module like Project or Task. conference for > exemple. > I am just fiddling around with creating an Asterisk UI for OGo, you can take this for example. http://docs.opengroupware.org/Members/buzzdee/asterisk/AsteriskUI/view or in the source, the stuff below the Misc directory. But much of it is broken, doesn't even compile. Take a look here, http://docs.opengroupware.org/Members/buzzdee/openbsd/ogo_install_obsd-4.0.tar.gz the patches files, these make the stuff work at least for me on OpenBSD. kind regards Sebastian From developer@opengroupware.org Fri Apr 20 17:57:17 2007 From: developer@opengroupware.org (herve AKEBOUE) Date: Fri, 20 Apr 2007 17:57:17 +0100 Subject: [OGo-Developer] differents users interfaces and addons In-Reply-To: <1177083797.4590.23.camel@aleph.whitemice.org> References: <496d66dd0704200759xa7c792y71ee32969eb49f2b@mail.gmail.com> <1177083797.4590.23.camel@aleph.whitemice.org> Message-ID: <496d66dd0704200957x6a5e0704g196012fdf2d16d01@mail.gmail.com> ------=_Part_122861_6788883.1177088237456 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline thanks Adam, now my organisation want to add new application like Video conference, tchat, i want if it's possible and if i could plug php application because i already develop these in php. 2007/4/20, Adam Tauno Williams : > > > hello world, how could i configure 2 sessions of ogo > > (ogo_me,ogo_mywife) with different interface of Main.html like > > (/usr/share/opengroupware.org1 and /usr/share/opengroupware2) > > I think there are scripts/instructions in the docs plone on how to do > this. > > > > And how could i create a module like Project or Task. conference for > > exemple. > > You mean develop a new application? > > There are several bundles in the Misc/ folder of the trunk including a > "Hello World" and a HelloDB bundle - > http://svn.opengroupware.org/viewcvs/trunk/Misc/?rev=1929 > > > > > > ------=_Part_122861_6788883.1177088237456 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline thanks Adam, now my organisation want to add new application like Video conference, tchat, i want if it's possible and if i could plug  php application because i already develop these in php.

2007/4/20, Adam Tauno Williams <adam@morrison-ind.com>:
> hello world, how could i configure 2 sessions of ogo
> (ogo_me,ogo_mywife) with different interface of Main.html like
> (/usr/share/opengroupware.org1 and /usr/share/opengroupware2)

I think there are scripts/instructions in the docs plone on how to do
this.
>
> And how could i create a module like Project or Task. conference for
> exemple.

You mean develop a new application?

There are several bundles in the Misc/ folder of the trunk including a
"Hello World"  and a HelloDB bundle -
http://svn.opengroupware.org/viewcvs/trunk/Misc/?rev=1929
>
>


------=_Part_122861_6788883.1177088237456-- From developer@opengroupware.org Fri Apr 20 18:00:39 2007 From: developer@opengroupware.org (herve AKEBOUE) Date: Fri, 20 Apr 2007 18:00:39 +0100 Subject: [OGo-Developer] differents users interfaces and addons In-Reply-To: <20070420165555.D8E1F3BF8A@l00-bugdead-prods.de> References: <20070420165555.D8E1F3BF8A@l00-bugdead-prods.de> Message-ID: <496d66dd0704201000s4f29bbcci82c11bbb868bf9fe@mail.gmail.com> ------=_Part_122947_23334195.1177088439604 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline i want to know something, i already develop with unix vi, is there any ide in windows or linux to create several application, without mistake, application ready for plug. 2007/4/20, Sebastian Reitenbach : > > Hi, > developer@opengroupware.org wrote: > > hello world, how could i configure 2 sessions of ogo (ogo_me,ogo_mywife) > > with different interface of Main.html like > (/usr/share/opengroupware.org1 > > and /usr/share/opengroupware2) > you can start multiple instances of ogo from one installation. You can > define the parameters that both instances shall share via the Default > command as the user that runs these instances. The rest that differs in > the > configuration, like the port of the listener (-WOPort), maybe some others > too, like LSAttachmentPath. or the database connection, whatever you > need ... you specify as command line parameter to the ogo instance. > > > > And how could i create a module like Project or Task. conference for > > exemple. > > > I am just fiddling around with creating an Asterisk UI for OGo, you can > take > this for example. > http://docs.opengroupware.org/Members/buzzdee/asterisk/AsteriskUI/view > or in the source, the stuff below the Misc directory. But much of it is > broken, doesn't even compile. Take a look here, > > http://docs.opengroupware.org/Members/buzzdee/openbsd/ogo_install_obsd-4.0.tar.gz > > the patches files, these make the stuff work at least for me on OpenBSD. > > > kind regards > Sebastian > > -- > OpenGroupware.org Developer > developer@opengroupware.org > http://mail.opengroupware.org/mailman/listinfo/developer > ------=_Part_122947_23334195.1177088439604 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline i want to know something, i already develop with unix vi, is there any ide in windows or linux to create several application, without mistake, application ready for plug.

2007/4/20, Sebastian Reitenbach < sebastia@l00-bugdead-prods.de>:
Hi,
developer@opengroupware.org wrote:
> hello world, how could i configure 2 sessions of ogo (ogo_me,ogo_mywife)
> with different interface of Main.html like (/usr/share/opengroupware.org1
> and /usr/share/opengroupware2)
you can start multiple instances of ogo from one installation. You can
define the parameters that both instances shall share via the Default
command as the user that runs these instances. The rest that differs in the
configuration, like the port of the listener (-WOPort), maybe some others
too, like LSAttachmentPath. or the database connection, whatever you
need ... you specify as command line parameter to the ogo instance.


> And how could i create a module like Project or Task. conference for
> exemple.
>
I am just fiddling around with creating an Asterisk UI for OGo, you can take
this for example.
http://docs.opengroupware.org/Members/buzzdee/asterisk/AsteriskUI/view
or in the source, the stuff below the Misc directory. But much of it is
broken, doesn't even compile. Take a look here,
http://docs.opengroupware.org/Members/buzzdee/openbsd/ogo_install_obsd-4.0.tar.gz

the patches files, these make the stuff work at least for me on OpenBSD.


kind regards
Sebastian

--
OpenGroupware.org Developer
developer@opengroupware.org
http://mail.opengroupware.org/mailman/listinfo/developer

------=_Part_122947_23334195.1177088439604-- From developer@opengroupware.org Fri Apr 20 18:10:05 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Fri, 20 Apr 2007 19:10:05 +0200 Subject: [OGo-Developer] differents users interfaces and addons Message-ID: <20070420171005.B71C93BECE@l00-bugdead-prods.de> developer@opengroupware.org wrote: > i want to know something, i already develop with unix vi, is there any ide oh, I know that, way tooo many vi consoles open ;) > in windows or linux to create several application, without mistake, I tried to use ProjectCenter some time ago on OpenBSD, but as OGo uses libFoundation and the ProjectCenter gnustep-base, I tried some time to get that working together, but gave up. > application ready for plug. don't know about Windows. kind regards Sebastian From developer@opengroupware.org Fri Apr 20 18:36:12 2007 From: developer@opengroupware.org (Adam Tauno Williams) Date: Fri, 20 Apr 2007 13:36:12 -0400 Subject: [OGo-Developer] differents users interfaces and addons In-Reply-To: <496d66dd0704200957x6a5e0704g196012fdf2d16d01@mail.gmail.com> References: <496d66dd0704200759xa7c792y71ee32969eb49f2b@mail.gmail.com> <1177083797.4590.23.camel@aleph.whitemice.org> <496d66dd0704200957x6a5e0704g196012fdf2d16d01@mail.gmail.com> Message-ID: <1177090572.4417.4.camel@aleph.whitemice.org> --=-rdWsgf0W5YxDr6w66WTR Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > thanks Adam, now my organisation want to add new application like > Video conference, tchat, i want if it's possible and if i could plug > php application because i already develop these in php. There was a project once-upon-a-time to support embedding PHP in OGo, but I think it is long since dead. http://mail.opengroupware.org/pipermail/users/2003-December/007564.html But you certainly can utilize OGo from 'external' PHP applications; we to that *ALOT*. OGo has an XML-RPC service. If you want there is POGI, which is a PHP wrapper around the XML-RPC daemon's API. http://mail.opengroupware.org/pipermail/xmlrpc/2006-June/000630.html And there is my XML-RPC bundle for ZideStore which I think makes some things easier - http://code.google.com/p/zogi/ >=20 --=-rdWsgf0W5YxDr6w66WTR Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBGKPoMLRePpNle04MRAjXGAJ9ItRUYeeKcO6PYZHW6/GBXCte9bQCfQuH9 BXY/MDdRtZHDNWGN77JUvNE= =1AbO -----END PGP SIGNATURE----- --=-rdWsgf0W5YxDr6w66WTR-- From developer@opengroupware.org Fri Apr 20 18:37:44 2007 From: developer@opengroupware.org (Adam Tauno Williams) Date: Fri, 20 Apr 2007 13:37:44 -0400 Subject: [OGo-Developer] differents users interfaces and addons In-Reply-To: <496d66dd0704201000s4f29bbcci82c11bbb868bf9fe@mail.gmail.com> References: <20070420165555.D8E1F3BF8A@l00-bugdead-prods.de> <496d66dd0704201000s4f29bbcci82c11bbb868bf9fe@mail.gmail.com> Message-ID: <1177090664.4417.7.camel@aleph.whitemice.org> --=-vV3munrxnANCKA1ZsIq6 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > i want to know something, i already develop with unix vi, is there any > ide in windows or linux to create several application, without > mistake, application ready for plug. I use gedit to edit Objective-C files. :) It colorizes .m files reasonably well. That is as close as I've gotten to an "IDE" --=-vV3munrxnANCKA1ZsIq6 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBGKPpoLRePpNle04MRAg+JAJ9K1TqZYlP80su5DLxLmiHVBj1RxwCePj7P XfJ2quKLEd5cjj64+mSeAcw= =qDDm -----END PGP SIGNATURE----- --=-vV3munrxnANCKA1ZsIq6-- From developer@opengroupware.org Fri Apr 20 18:42:05 2007 From: developer@opengroupware.org (Wolfgang Sourdeau) Date: Fri, 20 Apr 2007 13:42:05 -0400 Subject: [OGo-Developer] differents users interfaces and addons In-Reply-To: <1177090664.4417.7.camel@aleph.whitemice.org> Message-ID: <1db25aeb684afa2d15d46f02d15d085e@mozzarella> On 2007-04-20 13:37:44 -0400 Adam Tauno Williams wrote: >> i want to know something, i already develop with unix vi, is there >> any >> ide in windows or linux to create several application, without >> mistake, application ready for plug. > > I use gedit to edit Objective-C files. :) It colorizes .m files > reasonably well. That is as close as I've gotten to an "IDE" Both Emacs and VIM actually exist for Windows if you are used and if you like those environments. For Emacs, just go to ftp://ftp.gnu.org/gnu/emacs/. For vim, you would need to install the msys and msys-DTK from the Mingw32 project (http://www.mingw32.org/). Both work pretty well, although I prefer Emacs for programming. Wolfgang From developer@opengroupware.org Fri Apr 20 21:13:04 2007 From: developer@opengroupware.org (Helge Hess) Date: Fri, 20 Apr 2007 22:13:04 +0200 Subject: [OGo-Developer] differents users interfaces and addons In-Reply-To: <20070420165555.D8E1F3BF8A@l00-bugdead-prods.de> References: <20070420165555.D8E1F3BF8A@l00-bugdead-prods.de> Message-ID: On Apr 20, 2007, at 18:55, Sebastian Reitenbach wrote: > Hi, > developer@opengroupware.org wrote: >> hello world, how could i configure 2 sessions of ogo >> (ogo_me,ogo_mywife) >> with different interface of Main.html like (/usr/share/ >> opengroupware.org1 >> and /usr/share/opengroupware2) > you can start multiple instances of ogo from one installation. I'm not sure why he refers to Main.wo, but wouldn't that be just an additional theme? Helge -- Helge Hess http://www.helgehess.eu/ From developer@opengroupware.org Sat Apr 21 15:43:51 2007 From: developer@opengroupware.org (herve AKEBOUE) Date: Sat, 21 Apr 2007 14:43:51 +0000 Subject: [OGo-Developer] differents users interfaces and addons In-Reply-To: References: <20070420165555.D8E1F3BF8A@l00-bugdead-prods.de> Message-ID: <496d66dd0704210743k56d27f09k301a26287baf52ca@mail.gmail.com> ------=_Part_131448_25023678.1177166631242 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline "i dont understood what helge said" need more explication and if it could be manage with themes, how to configure ? 2007/4/20, Helge Hess : > > On Apr 20, 2007, at 18:55, Sebastian Reitenbach wrote: > > Hi, > > developer@opengroupware.org wrote: > >> hello world, how could i configure 2 sessions of ogo > >> (ogo_me,ogo_mywife) > >> with different interface of Main.html like (/usr/share/ > >> opengroupware.org1 > >> and /usr/share/opengroupware2) > > you can start multiple instances of ogo from one installation. > > I'm not sure why he refers to Main.wo, but wouldn't that be just an > additional theme? > > Helge > -- > Helge Hess > http://www.helgehess.eu/ > > > -- > OpenGroupware.org Developer > developer@opengroupware.org > http://mail.opengroupware.org/mailman/listinfo/developer > ------=_Part_131448_25023678.1177166631242 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline "i dont understood what helge said" need more explication and if it could be manage with themes, how to configure ?

2007/4/20, Helge Hess < helge.hess@opengroupware.org>:
On Apr 20, 2007, at 18:55, Sebastian Reitenbach wrote:
> Hi,
> developer@opengroupware.org wrote:
>> hello world, how could i configure 2 sessions of ogo
>> (ogo_me,ogo_mywife)
>> with different interface of Main.html like (/usr/share/
>> opengroupware.org1
>> and /usr/share/opengroupware2)
> you can start multiple instances of ogo from one installation.

I'm not sure why he refers to Main.wo , but wouldn't that be just an
additional theme?

Helge
--
Helge Hess
http://www.helgehess.eu/


--
OpenGroupware.org Developer
developer@opengroupware.org
http://mail.opengroupware.org/mailman/listinfo/developer

------=_Part_131448_25023678.1177166631242-- From developer@opengroupware.org Sun Apr 22 07:49:25 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Sun, 22 Apr 2007 08:49:25 +0200 Subject: [OGo-Developer] using a SkyDialNumber element in a PopUp Window Message-ID: <20070422064925.BE2233BF8A@l00-bugdead-prods.de> Hi folks, for the AsteriskUI I took the OGoMailInfo folder as an example and got it working so that a popup shows up on login or on reload of the webui, when there are waiting messages for the user in the asterisk. I thought it would be a good idea to be enable the user to trigger his telephone to dial to the users voice mail box right from the popup window via a SkyDialNumber element. http://docs.opengroupware.org/Members/buzzdee/asterisk/AsteriskVoiceMailIPopUP/image_view But when I click on the small telephone icon there, then my telephone is not ringing, and a copy of the main ogo webui window shows up in the small window. Well, why it is not triggering my phone, I need to take a look by myself, but is there a way to only reload, or close the contents of the small popup window instead of above described behaviour? kind regards Sebastian From developer@opengroupware.org Sun Apr 22 09:39:32 2007 From: developer@opengroupware.org (Helge Hess) Date: Sun, 22 Apr 2007 10:39:32 +0200 Subject: [OGo-Developer] using a SkyDialNumber element in a PopUp Window In-Reply-To: <20070422064925.BE2233BF8A@l00-bugdead-prods.de> References: <20070422064925.BE2233BF8A@l00-bugdead-prods.de> Message-ID: On Apr 22, 2007, at 08:49, Sebastian Reitenbach wrote: > I thought it would be a good idea to be enable the user to trigger his > telephone to dial to the users voice mail box right from the popup > window > via a SkyDialNumber element. > > http://docs.opengroupware.org/Members/buzzdee/asterisk/ > AsteriskVoiceMailIPopUP/image_view > > But when I click on the small telephone icon there, then my > telephone is not > ringing, and a copy of the main ogo webui window shows up in the small > window. Well, why it is not triggering my phone, I need to take a > look by > myself, but is there a way to only reload, or close the contents of > the > small popup window instead of above described behaviour? No. This is due to the way the OGo web interface (usually) works. The solution to this issue is to write a direct action which contains the functionality triggered by SkyDialNumber and make the latter generate that link. Greets, Helge -- Helge Hess http://www.helgehess.eu/ From developer@opengroupware.org Sun Apr 22 09:58:34 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Sun, 22 Apr 2007 10:58:34 +0200 Subject: [OGo-Developer] using a SkyDialNumber element in a PopUp Window Message-ID: <20070422085834.6D8543BFE9@l00-bugdead-prods.de> Hi Helge, thanks for your fast response. > > No. This is due to the way the OGo web interface (usually) works. The Not really the answer I wanted to hear ;) > solution to this issue is to write a direct action which contains the > functionality triggered by SkyDialNumber and make the latter generate > that link. And I have no clue how to do this, do you have any example in the ogo code in mind where I can take a look to see how sth. like this would work? kind regards Sebastian From developer@opengroupware.org Sun Apr 22 18:12:03 2007 From: developer@opengroupware.org (Helge Hess) Date: Sun, 22 Apr 2007 19:12:03 +0200 Subject: [OGo-Developer] using a SkyDialNumber element in a PopUp Window In-Reply-To: <20070422085834.6D8543BFE9@l00-bugdead-prods.de> References: <20070422085834.6D8543BFE9@l00-bugdead-prods.de> Message-ID: On Apr 22, 2007, at 10:58, Sebastian Reitenbach wrote: > And I have no clue how to do this, do you have any example in the > ogo code > in mind where I can take a look to see how sth. like this would work? Well, I don't really have the time to explain it in detail. Search the WebObjects documentation on "WODirectAction" and "WODirectActionRequestHandler" (most of OGo uses "component actions" aka WOComponentActionRequestHandler). The OGo source also contains a few direct action subclasses which can be used as an example. The difference is that for direct actions you need to do the request more or less manually while all that is automatically done by component actions (at the expense of some features ...) Its not that difficult to do once you got the concepts ..., which of course is not trivial :-) Greets, Helge -- Helge Hess http://www.helgehess.eu/ From developer@opengroupware.org Sun Apr 22 18:30:34 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Sun, 22 Apr 2007 19:30:34 +0200 Subject: [OGo-Developer] using a SkyDialNumber element in a PopUp Window Message-ID: <20070422173035.1E9D53C1E9@l00-bugdead-prods.de> Hi, > Well, I don't really have the time to explain it in detail. Search > the WebObjects documentation on "WODirectAction" and > "WODirectActionRequestHandler" (most of OGo uses "component actions" > aka WOComponentActionRequestHandler). The OGo source also contains a > few direct action subclasses which can be used as an example. > > The difference is that for direct actions you need to do the request > more or less manually while all that is automatically done by > component actions (at the expense of some features ...) > > Its not that difficult to do once you got the concepts ..., which of > course is not trivial :-) ok, I'm going to read, and experiment and will hopefully later be able to fix the problem ;) Sebastian From developer@opengroupware.org Sun Apr 22 23:53:36 2007 From: developer@opengroupware.org (Rafel Amer) Date: Mon, 23 Apr 2007 00:53:36 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary In-Reply-To: <20070420050334.1F83D3BB2F@l00-bugdead-prods.de> References: <20070420050334.1F83D3BB2F@l00-bugdead-prods.de> Message-ID: <462BE770.9080401@ruth.upc.edu> Sebastian, if I have understood the question, the initial value of self->multipleReturn is something like that: self->multipleReturn: ( { Abandoned = " 0"; Calls = " 0"; Completed = " 0"; Event = " QueueParams"; Holdtime = " 0"; Max = " 0"; Queue = " l00-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Weight = " 0"; }, { Abandoned = " 0"; Calls = " 0"; CallsTaken = " 0"; Completed = " 0"; Event = " QueueMember"; Holdtime = " 0"; LastCall = " 0"; Location = " Agent/303"; Max = " 0"; Membership = " static"; Paused = " 0"; Penalty = " 1"; Queue = " l00-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Status = " 4"; Weight = " 0"; }, { Abandoned = " 0"; Calls = " 0"; CallsTaken = " 0"; Completed = " 0"; Event = " QueueMember"; Holdtime = " 0"; LastCall = " 0"; Location = " Agent/202"; Max = " 0"; Membership = " static"; Paused = " 0"; Penalty = " 0"; Queue = " l00-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Status = " 4"; Weight = " 0"; }, { Abandoned = " 0"; Calls = " 0"; CallsTaken = " 0"; Completed = " 0"; Event = " QueueMember"; Holdtime = " 0"; LastCall = " 0"; Location = " Agent/101"; Max = " 0"; Membership = " static"; Paused = " 0"; Penalty = " 0"; Queue = " l00-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Status = " 4"; Weight = " 0"; }, { Abandoned = " 0"; Calls = " 0"; Completed = " 0"; Event = " QueueParams"; Holdtime = " 0"; Max = " 0"; Queue = " l01-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Weight = " 0"; }, { Abandoned = " 0"; Calls = " 0"; CallsTaken = " 0"; Completed = " 0"; Event = " QueueMember"; Holdtime = " 0"; LastCall = " 0"; Location = " Agent/303"; Max = " 0"; Membership = " static"; Paused = " 0"; Penalty = " 1"; Queue = " l01-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Status = " 4"; Weight = " 0"; }, { Abandoned = " 0"; Calls = " 0"; CallsTaken = " 0"; Completed = " 0"; Event = " QueueMember"; Holdtime = " 0"; LastCall = " 0"; Location = " Agent/202"; Max = " 0"; Membership = " static"; Paused = " 0"; Penalty = " 0"; Queue = " l01-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Status = " 4"; Weight = " 0"; }, { Abandoned = " 0"; Calls = " 0"; CallsTaken = " 0"; Completed = " 0"; Event = " QueueMember"; Holdtime = " 0"; LastCall = " 0"; Location = " Agent/101"; Max = " 0"; Membership = " static"; Paused = " 0"; Penalty = " 0"; Queue = " l01-bugdead-prods-queue"; ServiceLevel = " 0"; ServicelevelPerf = " 0.0"; Status = " 4"; Weight = " 0"; } ) with two queues l00-bugdead-prods-queue and l01-bugdead-prods-queue and the final value must be an array with two dictionaries, one for each queue? Can you trie the following code: - (NSArray *)getQueues { NSException *exc; exc = [self sendCommand:@"QueueStatus" withParameters:nil expectResult:[[[self asteriskCommands] objectForKey:@"QueueStatus"] objectForKey:@"ExpectedResult"]]; if(exc) { ASSIGN(self->lastException, exc); return nil; } NSEnumerator *e; NSMutableDictionary *queuesdict; id event; queuesdict = [[NSMutableDictionary alloc] init]; e = [self->multipleReturn objectEnumerator]; while ((event = [e nextObject]) != nil) { if ([[event objectForKey:@"Event"] hasSuffix:@" QueueParams"]) { NSMutableDictionary *tempdict; NSMutableArray *temparray; temparray = [[NSMutableArray alloc] init]; tempdict = [[NSMutableDictionary alloc] init]; [tempdict addEntriesFromDictionary:event]; [tempdict setObject:[temparray retain] forKey:@"Agents"]; [queuesdict setObject:[tempdict retain] forKey:[event valueForKey:@"Queue"]]; } else { NSMutableArray *temparray; temparray = [[queuesdict objectForKey:[event objectForKey:@"Queue"] objectForKey:@"Agents"]; [temparray addObject:event]; } } [self->multipleReturn release]; self->multipleReturn = nil; self->multipleReturn = [[queuesdict allValues] retain]; return self->multipleReturn; } Kind regards, Rafel Amer From developer@opengroupware.org Mon Apr 23 06:22:39 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Mon, 23 Apr 2007 07:22:39 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary Message-ID: <20070423052239.C6B413C239@l00-bugdead-prods.de> Hi Rafel, > Sebastian, > > if I have understood the question, the initial value of > self->multipleReturn is something like that: > [input array] > > > with two queues l00-bugdead-prods-queue and l01-bugdead-prods-queue > and the final value must be an array with two dictionaries, one for each > queue? yes, exactly, the input array can be an arbitrary number of queues. I expect the output array to have the following structure: self->multipleReturn ( { Queue = " l00-bugdead-prods"; Abandoned = " 0"; Calls = " 0"; Completed = " 0"; ... Agents = ( { Event = " QueueMember"; LastCall = " 0"; Location = " Agent/203"; Queue = " l00-bugdead-prods-queue"; ... }, { Event = " QueueMember"; LastCall = " 0"; Location = " Agent/103"; Queue = " l00-bugdead-prods-queue"; ... }; ); }, { Queue = " l01-bugdead-prods-queue"; Abandoned = " 0"; Calls = " 0"; Completed = " 0"; ... Agents = ( { Event = " QueueMember"; LastCall = " 0"; Location = " Agent/203"; Queue = " l01-bugdead-prods-queue"; ... }, { Event = " QueueMember"; LastCall = " 0"; Location = " Agent/103"; Queue = " l01-bugdead-prods-queue"; ... }; ); }; ) > > > Can you trie the following code: > [your code] I'll try at the evening today, but I am not sure whether it really does what I need. You are doing a lot of work in the if clause, I did a lot in else. I need to see it working, I'll let you know. thanks Sebastian From developer@opengroupware.org Mon Apr 23 19:42:57 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Mon, 23 Apr 2007 20:42:57 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary Message-ID: <20070423184258.357D43C34A@l00-bugdead-prods.de> Hi Rafel, > > Can you trie the following code: > > - (NSArray *)getQueues { > NSException *exc; > exc = [self sendCommand:@"QueueStatus" > withParameters:nil > expectResult:[[[self asteriskCommands] > objectForKey:@"QueueStatus"] > objectForKey:@"ExpectedResult"]]; > if(exc) { > ASSIGN(self->lastException, exc); > return nil; > } > > NSEnumerator *e; > NSMutableDictionary *queuesdict; > id event; > queuesdict = [[NSMutableDictionary alloc] init]; > > e = [self->multipleReturn objectEnumerator]; > while ((event = [e nextObject]) != nil) { > if ([[event objectForKey:@"Event"] hasSuffix:@" QueueParams"]) { > NSMutableDictionary *tempdict; > NSMutableArray *temparray; > temparray = [[NSMutableArray alloc] init]; > tempdict = [[NSMutableDictionary alloc] init]; > [tempdict addEntriesFromDictionary:event]; > [tempdict setObject:[temparray retain] forKey:@"Agents"]; > [queuesdict setObject:[tempdict retain] forKey:[event valueForKey:@"Queue"]]; > } else { > NSMutableArray *temparray; > temparray = [[queuesdict objectForKey:[event objectForKey:@"Queue"] > objectForKey:@"Agents"]; > [temparray addObject:event]; > } > } > [self->multipleReturn release]; > self->multipleReturn = nil; > self->multipleReturn = [[queuesdict allValues] retain]; > return self->multipleReturn; > } > I had to change the temparray = [[queuesdict objectForKey:[[event objectForKey:@"Queue"] objectForKey:@"Agents"]]; to let it compile, but then it ended up in an exception (Some NSConcrete8BitString does not recognize objectForKey) while running and I enter the AsteriskUI in OGo. Then I tried to replace my shuffling around with temporary variables where I put the queuesdict into the self->multipleReturn, your version: [self->multipleReturn release]; self->multipleReturn = nil; self->multipleReturn = [[queuesdict allValues] retain]; mixed the array completely up, My webUI expects an array, and the repetitions made it looking funny ;) my version of it below, but just only for one queue: [queuesdict takeValue:[membersarray copy] forKey:@"Agents"]; NSMutableArray *tmparray; tmparray = [[NSMutableArray alloc] init]; [tmparray addObject:queuesdict]; [self->multipleReturn removeAllObjects]; ASSIGN(self->multipleReturn, [tmparray copy]); nevertheless, thanks for taking time. kind regards Sebastian From developer@opengroupware.org Mon Apr 23 20:07:13 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Mon, 23 Apr 2007 21:07:13 +0200 Subject: [OGo-Developer] extending ogo with bundles Message-ID: <20070423190713.B0B273C339@l00-bugdead-prods.de> Hi, for the AsteriskUI I am working on, I now want to go to add a tab where the users can manage virtual telephone conference rooms. There should be virtual team telephone conference rooms as well as private conference rooms. Is it possible for me to add a bundle, that adds a checkbox to create a virtual team telephone conference room into the Asterisk database, when a team is created by a member of the team creators group so that he can create these on the fly if they are needed? I also want to "automagically" have the team conference rooms added to the "Appointment Resources", in a special group. Is that possible just by adding another wobundle, as I have done for the MWI in the AsteriskUI? After reading "Bundle up for a warm reception" and http://docs.opengroupware.org/Members/helge/bundles, "OGo pushes that to the extremes." I hope it will, but as so often, I don't know where to start. kind regards Sebastian From developer@opengroupware.org Mon Apr 23 21:45:15 2007 From: developer@opengroupware.org (Helge Hess) Date: Mon, 23 Apr 2007 22:45:15 +0200 Subject: [OGo-Developer] extending ogo with bundles In-Reply-To: <20070423190713.B0B273C339@l00-bugdead-prods.de> References: <20070423190713.B0B273C339@l00-bugdead-prods.de> Message-ID: <740FFBC2-31DC-4434-93D8-623F07A601C9@opengroupware.org> On Apr 23, 2007, at 21:07, Sebastian Reitenbach wrote: > Is it possible for me to add a bundle, that adds a checkbox to > create a > virtual team telephone conference room into the Asterisk database, > when a > team is created by a member of the team creators group so that he > can create > these on the fly if they are needed? Quite a complex sentence ;-) You want that a "team conference room" object is created when a team gets created? (and a flag is set). What is a "team conference room" object? Is it a section in the Asterisk configuration which you need to write into a file? > I also want to "automagically" have the > team conference rooms added to the "Appointment Resources", in a > special > group. What do you mean by "special group"? > Is that possible just by adding another wobundle, as I have done for > the MWI in the AsteriskUI? Probably not, no. Well you could enhance the team editor page component to embed additional sub-components based on an NGBundeManager search (on the bundle-info.plist's). Thats what I would do if it was a frequent requirement to enhance the team editor. If not, I would probably just add the option to the team editor. Thats the UI part. Then you would still need to trigger the additional backend operation. Another option would be to create the 'team conference room' on demand - if the user tries to enter it, but it doesn't exist yet. You could autocreate it then. Greets, Helge -- Helge Hess http://www.helgehess.eu/ From developer@opengroupware.org Tue Apr 24 06:06:28 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Tue, 24 Apr 2007 07:06:28 +0200 Subject: [OGo-Developer] extending ogo with bundles Message-ID: <20070424050628.8D6743C3F0@l00-bugdead-prods.de> developer@opengroupware.org wrote: > On Apr 23, 2007, at 21:07, Sebastian Reitenbach wrote: > > Is it possible for me to add a bundle, that adds a checkbox to > > create a > > virtual team telephone conference room into the Asterisk database, > > when a > > team is created by a member of the team creators group so that he > > can create > > these on the fly if they are needed? > > Quite a complex sentence ;-) > > You want that a "team conference room" object is created when a team > gets created? (and a flag is set). > > What is a "team conference room" object? Is it a section in the > Asterisk configuration which you need to write into a file? Right now, I use app_conference for virtual telephone conference rooms in Asterisk. The dial plan in /etc/asterisk/extensions.conf has to be prepared for a new team. I am not yet perfectly sure if it is possible to prepare that file so far, that it is not necessary to touch this file again on team creation, removal... The conference configuration itself is stored completely in the asterisk DB, and all could be done through the Asterisk Management Interface. I do not want to touch any Asterisk Configuration Files directly, because right now it is possible with the Asterisk UI to have the Asterisk running on some other host than the OGo is running, but when I start touching files, then this is not possible anymore. > > > I also want to "automagically" have the > > team conference rooms added to the "Appointment Resources", in a > > special > > group. > > What do you mean by "special group"? As there are special teams, like the news editors, team creators, there could be a "special" resource group, like asterisk_conference_rooms, containing all virtual team conference rooms. > > > Is that possible just by adding another wobundle, as I have done for > > the MWI in the AsteriskUI? > > Probably not, no. too bad. > > Well you could enhance the team editor page component to embed > additional sub-components based on an NGBundeManager search (on the > bundle-info.plist's). Thats what I would do if it was a frequent > requirement to enhance the team editor. I have no clue how to do this, do you have any examples where I could take a look in the source to figure out how this would work? > If not, I would probably just add the option to the team editor. > Thats the UI part. Then you would still need to trigger the > additional backend operation. Ah, OK, so enhancing the team editor so that it can detect whether the AsteriskUI bundle is available, and if so, it just add the pieces to allow handling of team conference rooms. Is there some Classes/methods available that could be used to detect whether a given bundle is available on runtime? Or should I define a Default like this EnableAsteriskConferenceRoomHandlingInTeamsUI? > > Another option would be to create the 'team conference room' on > demand - if the user tries to enter it, but it doesn't exist yet. You > could autocreate it then. This might or might not work, but if someone just calls the conference rooms before creation... Also password PIN's to the conference rooms have to be set, this would have to be done automatically too. From developer@opengroupware.org Tue Apr 24 08:41:12 2007 From: developer@opengroupware.org (Helge Hess) Date: Tue, 24 Apr 2007 09:41:12 +0200 Subject: [OGo-Developer] extending ogo with bundles In-Reply-To: <20070424050628.8D6743C3F0@l00-bugdead-prods.de> References: <20070424050628.8D6743C3F0@l00-bugdead-prods.de> Message-ID: <09547453-8261-4983-9B70-7163FC55DA30@opengroupware.org> On Apr 24, 2007, at 07:06, Sebastian Reitenbach wrote: > The conference configuration itself is stored completely in the > asterisk DB Whats the Asterisk DB? Is it stored in an RDBMS? >> Well you could enhance the team editor page component to embed >> additional sub-components based on an NGBundeManager search (on the >> bundle-info.plist's). Thats what I would do if it was a frequent >> requirement to enhance the team editor. > I have no clue how to do this, do you have any examples where I > could take a > look in the source to figure out how this would work? I suppose the way the mail viewer works would be closest. But I guess its too difficult. >> If not, I would probably just add the option to the team editor. >> Thats the UI part. Then you would still need to trigger the >> additional backend operation. > Ah, OK, so enhancing the team editor so that it can detect whether the > AsteriskUI bundle is available, and if so, it just add the pieces > to allow > handling of team conference rooms. Yes. > Is there some Classes/methods available that could be used to > detect whether > a given bundle is available on runtime? Or should I define a > Default like > this EnableAsteriskConferenceRoomHandlingInTeamsUI? There should be some places left where this is done (checks for the mailer?), search for 'has' and 'bundlemanager'. Be careful not to link the teams application against Asterisk specific bundles. If you need to access code in optional parts, you need to resort to 'NSClassFromString' to lookup classes. >> Another option would be to create the 'team conference room' on >> demand - if the user tries to enter it, but it doesn't exist yet. You >> could autocreate it then. > This might or might not work, but if someone just calls the > conference rooms > before creation... Also password PIN's to the conference rooms have > to be > set, this would have to be done automatically too. OK. Greets, Helge -- Helge Hess http://www.helgehess.eu/ From developer@opengroupware.org Tue Apr 24 09:23:21 2007 From: developer@opengroupware.org (=?ISO-8859-1?Q?Marcus_M=FCller?=) Date: Tue, 24 Apr 2007 10:23:21 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary In-Reply-To: <20070423184258.357D43C34A@l00-bugdead-prods.de> References: <20070423184258.357D43C34A@l00-bugdead-prods.de> Message-ID: --Apple-Mail-9--620177529 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On 23.04.2007, at 20:42, Sebastian Reitenbach wrote: > Hi Rafel, > >> NSMutableArray *temparray; >> temparray = [[queuesdict objectForKey:[event >> objectForKey:@"Queue"] >> objectForKey:@"Agents"]; >> > I had to change the > > temparray = [[queuesdict objectForKey:[[event > objectForKey:@"Queue"] > objectForKey:@"Agents"]]; > > to let it compile, but then it ended up in an exception (Some > NSConcrete8BitString does not recognize objectForKey) while running > and I That's obviously the wrong fix. I think the intended statement was: temparray = [[queuesdict objectForKey:[event objectForKey:@"Queue"]] objectForKey:@"Agents"]; It's always a good idea to make code more readable by splitting everything into little steps, i.e.: --- snip --- NSString *queueKey; NSDictionary *queue; NSArray *agents; queueKey = [event objectForKey:@"Queue"]; queue = [queuesdict objectForKey:queueKey]; agents = [queue objectForKey:@"Agents"]; --- snap --- Cheers, Marcus -- Marcus Mueller . . . crack-admin/coder ;-) Mulle kybernetiK . http://www.mulle-kybernetik.com Current projects: http://www.mulle-kybernetik.com/znek/ --Apple-Mail-9--620177529 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1
On 23.04.2007, at = 20:42, Sebastian Reitenbach wrote:

Hi Rafel,

=A0 =A0=A0 =A0NSMutableArray = *temparray;
=A0 =A0 =A0 temparray =3D = [[queuesdict objectForKey:[event objectForKey:@"Queue"]=A0
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 objectForKey:@"Agents"];

I had to = change the=A0

=A0 =A0 =A0 temparray =3D = [[queuesdict objectForKey:[[event objectForKey:@"Queue"]=A0
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 objectForKey:@"Agents"]];

to let = it compile, but then it ended up in an exception (Some=A0
=A0
That's obviously the wrong = fix. I think the intended statement was:

=A0 =A0=A0 =A0temparray =3D = [[queuesdict objectForKey:[event objectForKey:@"Queue"]]=A0
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = objectForKey:@"Agents"];

It's always a good idea to = make code more readable by splitting everything into little steps, = i.e.:

--- = snip ---

NSString=A0 =A0 = =A0*queueKey;
NSDictionary *queue;
NSArray=A0 =A0=A0 = =A0*agents;

queueKey =3D=A0[event = objectForKey:@"Queue"];
queue =A0 =A0=3D [queuesdict = objectForKey:queueKey];
agents=A0 =A0=3D [queue = objectForKey:@"Agents"];

--- = snap ---

Cheers,


=A0=A0Marcus


--=A0

Marcus Mueller=A0=A0.=A0=A0.=A0=A0.=A0=A0crack-admin/coder = ;-)

Mulle = kybernetiK=A0=A0.=A0=A0http://www.mulle-kybernetik.com

Current = projects:=A0http://www.mulle-kybernetik= .com/znek/


=

= --Apple-Mail-9--620177529-- From developer@opengroupware.org Tue Apr 24 10:51:57 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Tue, 24 Apr 2007 11:51:57 +0200 Subject: [OGo-Developer] extending ogo with bundles Message-ID: <20070424095157.C58F43C361@l00-bugdead-prods.de> Hi, developer@opengroupware.org wrote: > On Apr 24, 2007, at 07:06, Sebastian Reitenbach wrote: > > The conference configuration itself is stored completely in the > > asterisk DB > > Whats the Asterisk DB? Is it stored in an RDBMS? no, its more or less a flat file, for Asterisk internal use, where you can store key, value pairs in it. At least, I can manipulate the contents via the Asteriks Management Interface. When these keys and values are used in the dialplan, e.g. to setup conferences and other fancy stuff, then these keys and values are used on the fly, without the need to reload the asterisk. No SQL > > >> Well you could enhance the team editor page component to embed > >> additional sub-components based on an NGBundeManager search (on the > >> bundle-info.plist's). Thats what I would do if it was a frequent > >> requirement to enhance the team editor. > > I have no clue how to do this, do you have any examples where I > > could take a > > look in the source to figure out how this would work? > > I suppose the way the mail viewer works would be closest. But I guess > its too difficult. > > >> If not, I would probably just add the option to the team editor. > >> Thats the UI part. Then you would still need to trigger the > >> additional backend operation. > > Ah, OK, so enhancing the team editor so that it can detect whether the > > AsteriskUI bundle is available, and if so, it just add the pieces > > to allow > > handling of team conference rooms. > > Yes. > > > Is there some Classes/methods available that could be used to > > detect whether > > a given bundle is available on runtime? Or should I define a > > Default like > > this EnableAsteriskConferenceRoomHandlingInTeamsUI? > > There should be some places left where this is done (checks for the > mailer?), search for 'has' and 'bundlemanager'. thanks, that are the hints I need I think. > > Be careful not to link the teams application against Asterisk > specific bundles. If you need to access code in optional parts, you > need to resort to 'NSClassFromString' to lookup classes. > ah, ok, thanks for the information. kind regards Sebastian From developer@opengroupware.org Tue Apr 24 13:46:45 2007 From: developer@opengroupware.org (Rafel Amer Ramon) Date: Tue, 24 Apr 2007 14:46:45 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary In-Reply-To: <20070423184258.357D43C34A@l00-bugdead-prods.de> References: <20070423184258.357D43C34A@l00-bugdead-prods.de> Message-ID: <462DFC35.5090606@ruth.upc.edu> This is a multi-part message in MIME format. --------------030605040303000004020300 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit En/na Sebastian Reitenbach ha escrit: > Hi Rafel, > I had to change the > > temparray = [[queuesdict objectForKey:[[event objectForKey:@"Queue"] > objectForKey:@"Agents"]]; > > to let it compile, but then it ended up in an exception (Some > NSConcrete8BitString does not recognize objectForKey) while running and I > enter the AsteriskUI in OGo. Then I tried to replace my shuffling around > with temporary variables where I put the queuesdict into the > self->multipleReturn, your version: > > [self->multipleReturn release]; > self->multipleReturn = nil; > self->multipleReturn = [[queuesdict allValues] retain]; > > mixed the array completely up, My webUI expects an array, and the > repetitions made it looking funny ;) > my version of it below, but just only for one queue: > > [queuesdict takeValue:[membersarray copy] forKey:@"Agents"]; > NSMutableArray *tmparray; > tmparray = [[NSMutableArray alloc] init]; > [tmparray addObject:queuesdict]; > [self->multipleReturn removeAllObjects]; > ASSIGN(self->multipleReturn, [tmparray copy]); > > nevertheless, thanks for taking time. > > kind regards > Sebastian > Hi Sebastian, I send you the program with my latest tries. I think it works even if the initial values of self->multipleReturn are not ordered You have to compile the program try.m with gcc -o try -lFoundation try.m Kind regards, Rafel -- Aquest missatge ha estat analitzat per MailScanner a la cerca de virus i d'altres continguts perillosos, i es considera que està net. For all your IT requirements visit: http://www.transtec.co.uk --------------030605040303000004020300 Content-Type: text/plain; name="input.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="input.txt" ( { Abandoned = " 0"; Calls = " 0"; Completed = " 0"; Event = " QueueParams"; Queue = " l00-bugdead-prods-queue"; }, { Abandoned = " 0"; Calls = " 0"; Event = " QueueMember"; Location = " Agent/202"; Queue = " l00-bugdead-prods-queue"; }, { Abandoned = " 0"; Calls = " 0"; Event = " QueueMember"; Location = " Agent/303"; Queue = " l00-bugdead-prods-queue"; }, { Abandoned = " 0"; Calls = " 0"; Event = " QueueMember"; Location = " Agent/101"; Queue = " l11-bugdead-prods-queue"; }, { Abandoned = " 0"; Calls = " 0"; Event = " QueueMember"; Location = " Agent/303"; Queue = " l11-bugdead-prods-queue"; }, { Abandoned = " 0"; Calls = " 0"; Event = " QueueMember"; Location = " Agent/202"; Queue = " l11-bugdead-prods-queue"; }, { Abandoned = " 0"; Calls = " 0"; Completed = " 0"; Event = " QueueParams"; Queue = " l11-bugdead-prods-queue"; } ); --------------030605040303000004020300 Content-Type: text/x-objcsrc; name="try.m" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="try.m" #include @interface StuffingArray : NSObject { NSArray *multipleReturn; } - (NSArray *)multipleReturn; - (NSArray *)getQueues; @end @implementation StuffingArray - (id)init { NSData *data; NSString *contents; data = [NSData dataWithContentsOfFile:@"input.txt"]; contents = [[NSMutableString alloc] initWithData:data encoding:NSISOLatin1StringEncoding]; self->multipleReturn = [contents propertyList]; return self; } - (void)dealloc { [self->multipleReturn release]; [super dealloc]; } - (NSArray *)getQueues { NSEnumerator *e; NSMutableDictionary *queuesdict; NSMutableArray *queuesarray; id event; queuesdict = [[NSMutableDictionary alloc] init]; queuesarray = [[NSMutableArray alloc] init]; e = [self->multipleReturn objectEnumerator]; while ((event = [e nextObject]) != nil) { NSString *queue; NSMutableDictionary *tempdict; NSMutableArray *temparray; queue = [event objectForKey:@"Queue"]; /* First, if needed, we initialize the dictionary queuesdict with an empty dictionary for the key queue. For that dictionary, we initialize the key "Agents" with an empty array. */ if([queuesdict objectForKey:queue] == nil) { temparray = [[NSMutableArray alloc] init]; tempdict = [[NSMutableDictionary alloc] init]; [tempdict setObject:[temparray retain] forKey:@"Agents"]; [queuesdict setObject:[tempdict retain] forKey:queue]; } /* Now whe are sure that the values are initialized, we get that values */ tempdict = [queuesdict objectForKey:queue]; temparray = [tempdict objectForKey:@"Agents"]; /* Finally, we assign values. The queuesarray is used to get the order in which the QueueParams appears, so that we can preserve ordering. */ if ([[event objectForKey:@"Event"] hasSuffix:@" QueueParams"]) { [tempdict addEntriesFromDictionary:event]; [queuesarray addObject:queue]; } else { [temparray addObject:event]; } } int k; NSString *elem; [self->multipleReturn release]; self->multipleReturn = nil; /* Now we replace the values of queuesarray for the values of queuesdict, so that we get the final array. */ for(k=0;k<[queuesarray count];k++) { elem = [queuesarray objectAtIndex:k]; [queuesarray replaceObjectAtIndex:k withObject:[queuesdict objectForKey:elem]]; } self->multipleReturn = [queuesarray retain]; return self->multipleReturn; } - (NSArray *)multipleReturn { return self->multipleReturn; } @end int main(int argc, char **argv, char **env) { NSAutoreleasePool *pool; StuffingArray *stuffing; NSArray *out; [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; pool = [NSAutoreleasePool new]; stuffing = [[StuffingArray alloc] init]; out = [stuffing getQueues]; NSLog(@"HHHHHHHHHHHHH %@",[stuffing multipleReturn]); exit(0); } --------------030605040303000004020300-- From developer@opengroupware.org Tue Apr 24 20:03:27 2007 From: developer@opengroupware.org (Sebastian Reitenbach) Date: Tue, 24 Apr 2007 21:03:27 +0200 Subject: [OGo-Developer] stuffing an NSArray into a NSMutableDictionary Message-ID: <20070424190327.F074E3C498@l00-bugdead-prods.de> Hi Marcus, Rafel, > That's obviously the wrong fix. I think the intended statement was: yes, that was it. > > temparray = [[queuesdict objectForKey:[event > objectForKey:@"Queue"]] > objectForKey:@"Agents"]; > and that fixed it. both of you, thanks a lot, it's working now as expected. http://docs.opengroupware.org/Members/buzzdee/asterisk/queuesscreenshot/image_view now I can go on with the conferences ;) kind regards Sebastian From developer@opengroupware.org Wed Apr 25 15:19:54 2007 From: developer@opengroupware.org (Antony Gelberg) Date: Wed, 25 Apr 2007 15:19:54 +0100 Subject: [OGo-Developer] GNUstep make tree? Message-ID: <462F638A.6050003@wayforth.co.uk> Hi all, I'm building from SVN. I've built and installed SOPE, but when I try to build OGo (following possibly outdated http://www.opengroupware.org/en/devs/build/ogo.html): antony@myung:~/src/svn/ogo-trunk$ ./configure --enable-debug error: please specify a GNUstep make tree! I'm sure it's simple, but I'm clueless. Antony From developer@opengroupware.org Wed Apr 25 15:28:46 2007 From: developer@opengroupware.org (Antony Gelberg) Date: Wed, 25 Apr 2007 15:28:46 +0100 Subject: [OGo-Developer] Gmane? Message-ID: <462F659E.9030904@wayforth.co.uk> Helge and others, Do you have any objection to my submitting this list to gmane? I'm using gmane a lot these days, to avoid hoarding mail - the users list is there, but I don't see this one. Antony From developer@opengroupware.org Wed Apr 25 15:32:30 2007 From: developer@opengroupware.org (Antony Gelberg) Date: Wed, 25 Apr 2007 15:32:30 +0100 Subject: [OGo-Developer] GNUstep make tree? In-Reply-To: <462F638A.6050003@wayforth.co.uk> References: <462F638A.6050003@wayforth.co.uk> Message-ID: <462F667E.10500@wayforth.co.uk> Antony Gelberg wrote: > Hi all, > > I'm building from SVN. I've built and installed SOPE, but when I try to > build OGo (following possibly outdated > http://www.opengroupware.org/en/devs/build/ogo.html): > > antony@myung:~/src/svn/ogo-trunk$ ./configure --enable-debug > error: please specify a GNUstep make tree! > I'm going to answer myself here - is this correct or will it break? That path had GNUstep.sh in, which is what led me to make that guess. --gsmake=../sope-trunk/gnustep-make/ Antony From developer@opengroupware.org Wed Apr 25 15:32:59 2007 From: developer@opengroupware.org (Helge Hess) Date: Wed, 25 Apr 2007 16:32:59 +0200 Subject: [OGo-Developer] Gmane? In-Reply-To: <462F659E.9030904@wayforth.co.uk> References: <462F659E.9030904@wayforth.co.uk> Message-ID: <3D5DB90F-8535-4BBC-B0C2-B59C878E3CA4@opengroupware.org> On Apr 25, 2007, at 16:28, Antony Gelberg wrote: > Do you have any objection to my submitting this list to gmane? I'm > using gmane a lot these days, to avoid hoarding mail - the users > list is > there, but I don't see this one. Isn't this list already added to Gmane? Personally I don't care, feel free to add it. Helge -- Helge Hess http://www.helgehess.eu/ From developer@opengroupware.org Wed Apr 25 15:54:03 2007 From: developer@opengroupware.org (Adam Tauno Williams) Date: Wed, 25 Apr 2007 10:54:03 -0400 Subject: [OGo-Developer] GNUstep make tree? In-Reply-To: <462F638A.6050003@wayforth.co.uk> References: <462F638A.6050003@wayforth.co.uk> Message-ID: <1177512843.4267.7.camel@aleph.whitemice.org> --=-wv9BG7Ni0ZH/2RdXBJoy Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > I'm building from SVN. I've built and installed SOPE, but when I try to > build OGo (following possibly outdated > http://www.opengroupware.org/en/devs/build/ogo.html): > antony@myung:~/src/svn/ogo-trunk$ ./configure --enable-debug > error: please specify a GNUstep make tree! > I'm sure it's simple, but I'm clueless. I do - . /usr/local/OGo-GNUstep/Library/Makefiles/GNUstep.sh=20 ./configure --enable-debug --without-pisock --=-wv9BG7Ni0ZH/2RdXBJoy Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBGL2uLLRePpNle04MRAtCMAKCBEKD+XW8nhvdsOwRL+QDXatG0TgCfekLw 9FT++Oh4zd24GR45f6OLaNs= =omgn -----END PGP SIGNATURE----- --=-wv9BG7Ni0ZH/2RdXBJoy-- From developer@opengroupware.org Wed Apr 25 16:19:36 2007 From: developer@opengroupware.org (Adam Tauno Williams) Date: Wed, 25 Apr 2007 11:19:36 -0400 Subject: [OGo-Developer] GNUstep make tree? In-Reply-To: <462F667E.10500@wayforth.co.uk> References: <462F638A.6050003@wayforth.co.uk> <462F667E.10500@wayforth.co.uk> Message-ID: <1177514376.4267.13.camel@aleph.whitemice.org> --=-pE50rPQ6uIrvLyb0g7Wc Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > > I'm building from SVN. I've built and installed SOPE, but when I try t= o > > build OGo (following possibly outdated > > http://www.opengroupware.org/en/devs/build/ogo.html): > > antony@myung:~/src/svn/ogo-trunk$ ./configure --enable-debug > > error: please specify a GNUstep make tree! > I'm going to answer myself here - is this correct or will it break? > That path had GNUstep.sh in, which is what led me to make that guess. > --gsmake=3D../sope-trunk/gnustep-make/ If you are thinking about trying to crank out a patch for Bug#150 (IMAP/SSL) I looked at this issue for someone a little while ago and have some notes (which may or may not be accurate or even understandable): ---------------------------- It looks like initWithNSURL calls the same initWithConnectionDictionary method that OGo uses to setup an IMAP connection, but initWithNSURL checks for the "imaps" scheme and adds a corresponding key to the connection dictionary... - (id)initWithNSURL:(NSURL *)_url { ... if ([[_url scheme] isEqualToString:@"imaps"]) [md setObject:[NSNumber numberWithBool:YES] forKey:@"SSL"]; ... OGo calls initWithConnectionDictionary only from "Mailer/OGoWebMail/SkyImapContextHandler.m" - (NGImap4Context *)imapContextWithSession:(id)_session password:(NSString *)_pwd login:(NSString **)login_ host:(NSString **)host_ errorString:(NSString **)error_ { .... condict =3D [NSDictionary dictionaryWithObjectsAndKeys: *login_, @"login", _pwd , @"passwd", *host_, @"host", nil]; imapCtx =3D [[NGImap4Context alloc] initWithConnectionDictionary:condict]; [imapCtx enterSyncMode]; The "WebUI/Mailer/OGoWebMail/LSWImapMails.m" sets up the IMAP connection with - - (id)doLogin { self->loginFailed =3D NO; [self clearVars]; [[self imapCtxHandler] prepareForLogin:self->login passwd:self->passwd host:self->host savePwd:self->savePasswd session:[self session]]; [self initializeImapWithPasswd:self->passwd]; [self->passwd release]; self->passwd =3D nil; if (![self isLogin]) return nil; ASSIGN(self->tabKey, @"mail"); return nil; } SkyImapContextHandler:prepareForLogin digs the settings out of the defaults: NSUserDefaults *defs; defs =3D [_session userDefaults]; .... if (_host !=3D nil) [self _writeDefault:@"imap_host" value:_host session:_session]; It is "initializeImapWithPasswd" that looks like it actually sets up the IMAP connection; this is the method that calls "imapContextWithSession" So if imapContextWithSession added the SSL key to the connection dictionary would we have encrypted IMAP? It would seem like a useSSL: parameter should be added to SkyImapContextHandler:prepareForLogin so that when LSWImapMails:initializeImapWithPasswd the SkyImapContextHandler:imapContextWithSession knows to add the SSL key; or what value to assign the key (one assumes the key can always be added but with a false value if SSL is not required)??? So sequence is - LSWImapMails:doLogin SkyImapContextHandler:prepareForLogin LSWImapMails:initializeImapWithPasswd SkyImapContextHandler:imapContextWithSession NGImap4Context:initWithConnectionDictionary:=20 * Seems to do redundant grousing about in user defaults NGImap4Context:enterSyncMode (?) ----------------- --=-pE50rPQ6uIrvLyb0g7Wc Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBGL3GILRePpNle04MRAtUPAJ93Zh3HnqEjLCL6ftnsVlvCAQ97uwCfbZD9 36sLEiSvYzIa7ooOkbExfXs= =4ufN -----END PGP SIGNATURE----- --=-pE50rPQ6uIrvLyb0g7Wc-- From developer@opengroupware.org Wed Apr 25 16:24:21 2007 From: developer@opengroupware.org (Antony Gelberg) Date: Wed, 25 Apr 2007 16:24:21 +0100 Subject: [OGo-Developer] GNUstep make tree? In-Reply-To: <1177512843.4267.7.camel@aleph.whitemice.org> References: <462F638A.6050003@wayforth.co.uk> <1177512843.4267.7.camel@aleph.whitemice.org> Message-ID: <462F72A5.5070603@wayforth.co.uk> Adam Tauno Williams wrote: >> I'm building from SVN. I've built and installed SOPE, but when I try to >> build OGo (following possibly outdated >> http://www.opengroupware.org/en/devs/build/ogo.html): >> antony@myung:~/src/svn/ogo-trunk$ ./configure --enable-debug >> error: please specify a GNUstep make tree! >> I'm sure it's simple, but I'm clueless. > > I do - > . /usr/local/OGo-GNUstep/Library/Makefiles/GNUstep.sh > ./configure --enable-debug --without-pisock > I had no GNUstep.sh in my ogo trunk. So I did a bit of searching and installed Debian package gnustep-make-ogo, which includes /usr/lib/opengroupware.org/System/Library/Makefiles/GNUstep.sh. I was then able to source that file, similar to you above. However, then my build stops with /usr/lib/opengroupware.org/System/Library/Makefiles/wobundle.make. Sure enough, it's not there: antony@myung:~/src/svn/ogo-trunk$ ls /usr/lib/opengroupware.org/System/Library/Makefiles Additional GNUstep.sh palette.make aggregate.make gswapp.make relative_path.sh application.make gswbundle.make resource-set.make Auxiliary install-sh rules.make bundle.make Instance service.make clean_cpu.sh ix86 spec-debug-alone-rules.template clean_os.sh java-executable.template spec-debug-rules.template clean_vendor.sh java.make spec-rules.template clibrary.make java-tool.make strip_makefiles.sh common.make jni.make subproject.make config.guess ld_lib_path.csh tar-exclude-list config.make ld_lib_path.sh target.make config.sub library-combo.make test-application.make cpu.sh library.make test-library.make ctool.make Master test-tool.make documentation.make messages.make tool.make executable.template mkinstalldirs transform_paths.sh fixpath.sh names.make vendor.sh framework.make native-library.make which_lib GNUstep.csh objc.make GNUstep-reset.sh os.sh antony@myung:~/src/svn/ogo-trunk$ I assume that I'm using an old version - where should I get the most up-to-date Makefiles, and what did I miss in the build guide? Antony From developer@opengroupware.org Wed Apr 25 16:29:53 2007 From: developer@opengroupware.org (Adam Tauno Williams) Date: Wed, 25 Apr 2007 11:29:53 -0400 Subject: [OGo-Developer] GNUstep make tree? In-Reply-To: <462F72A5.5070603@wayforth.co.uk> References: <462F638A.6050003@wayforth.co.uk> <1177512843.4267.7.camel@aleph.whitemice.org> <462F72A5.5070603@wayforth.co.uk> Message-ID: <1177514993.4267.18.camel@aleph.whitemice.org> --=-nLnPSm4wHf9a0UQcu/da Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > >> I'm building from SVN. I've built and installed SOPE, but when I try = to > >> build OGo (following possibly outdated > >> http://www.opengroupware.org/en/devs/build/ogo.html): > >> antony@myung:~/src/svn/ogo-trunk$ ./configure --enable-debug > >> error: please specify a GNUstep make tree! > >> I'm sure it's simple, but I'm clueless. > > I do - > > . /usr/local/OGo-GNUstep/Library/Makefiles/GNUstep.sh=20 > > ./configure --enable-debug --without-pisock > I had no GNUstep.sh in my ogo trunk. So I did a bit of searching and > installed Debian package gnustep-make-ogo, which includes > /usr/lib/opengroupware.org/System/Library/Makefiles/GNUstep.sh. I was > then able to source that file, similar to you above. However, then my > build stops with > /usr/lib/opengroupware.org/System/Library/Makefiles/wobundle.make. Sure > enough, it's not there: No, you need all the Obj-C/GNUStep-Make/libFoundation/SOPE environment. $ rpm -qf /usr/local/OGo-GNUstep//Library/Makefiles/wobundle.make sope46-appserver-devel-4.6-trunk_r1469 SOPE, et al add the what is provided by ogo-gnustep_make See here - http://docs.opengroupware.org/Members/whitemice/misc/building/document_view= - and here - http://docs.opengroupware.org/Members/whitemice/misc/Building= OGoPackagesForSUSE/document_view While the distribution may change package names, paths, etc... the principle and order-of-operations remains the same: (1) libFoundation (2) SOPE, and then (3) OGo --=-nLnPSm4wHf9a0UQcu/da Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBGL3PxLRePpNle04MRAgYdAJ9cNxws8/lRbt+4uH4stMy3a5trYgCeIkMv EOW+SA+OjVoSwHqWisWn46o= =FQA2 -----END PGP SIGNATURE----- --=-nLnPSm4wHf9a0UQcu/da-- From developer@opengroupware.org Wed Apr 25 22:35:31 2007 From: developer@opengroupware.org (Antony Gelberg) Date: Wed, 25 Apr 2007 22:35:31 +0100 Subject: [OGo-Developer] GNUstep make tree? In-Reply-To: <1177514993.4267.18.camel@aleph.whitemice.org> References: <462F638A.6050003@wayforth.co.uk> <1177512843.4267.7.camel@aleph.whitemice.org> <462F72A5.5070603@wayforth.co.uk> <1177514993.4267.18.camel@aleph.whitemice.org> Message-ID: <462FC9A3.1050104@wayforth.co.uk> Adam Tauno Williams wrote: >>>> I'm building from SVN. I've built and installed SOPE, but when I try to >>>> build OGo (following possibly outdated >>>> http://www.opengroupware.org/en/devs/build/ogo.html): >>>> antony@myung:~/src/svn/ogo-trunk$ ./configure --enable-debug >>>> error: please specify a GNUstep make tree! >>>> I'm sure it's simple, but I'm clueless. >>> I do - >>> . /usr/local/OGo-GNUstep/Library/Makefiles/GNUstep.sh >>> ./configure --enable-debug --without-pisock >> I had no GNUstep.sh in my ogo trunk. So I did a bit of searching and >> installed Debian package gnustep-make-ogo, which includes >> /usr/lib/opengroupware.org/System/Library/Makefiles/GNUstep.sh. I was >> then able to source that file, similar to you above. However, then my >> build stops with >> /usr/lib/opengroupware.org/System/Library/Makefiles/wobundle.make. Sure >> enough, it's not there: > > No, you need all the Obj-C/GNUStep-Make/libFoundation/SOPE environment. > > $ rpm -qf /usr/local/OGo-GNUstep//Library/Makefiles/wobundle.make > sope46-appserver-devel-4.6-trunk_r1469 > > SOPE, et al add the what is provided by ogo-gnustep_make > > See here - > http://docs.opengroupware.org/Members/whitemice/misc/building/document_view - and here - http://docs.opengroupware.org/Members/whitemice/misc/BuildingOGoPackagesForSUSE/document_view > > While the distribution may change package names, paths, etc... the > principle and order-of-operations remains the same: (1) libFoundation > (2) SOPE, and then (3) OGo Thanks for the hints. I built SOPE as well, so I knew that wobundle.make was around somewhere. I found it in sope-trunk/.gsmake/. I uninstalled my distro's gnustep-make-ogo package, which was providing some, but not all of the makefiles in sope-trunk/.gsmake/ and ran ./configure --enable-debug --without-pisock --gsmake=../sope-trunk/.gsmake/, and it built. Now to grab the create-instance and init scripts. Antony From developer@opengroupware.org Thu Apr 26 00:17:28 2007 From: developer@opengroupware.org (Antony Gelberg) Date: Thu, 26 Apr 2007 00:17:28 +0100 Subject: [OGo-Developer] NXConstantString does not recognize... Message-ID: <462FE188.8000306@wayforth.co.uk> I'm seeing something like http://www.nabble.com/I-broke-my-OGo!-(upgrade-issue)-t2744059.html except I've been building from SVN. I'm using libfoundation-1.1 from http://download.opengroupware.org/releases/unstable/ThirdParty/sarge/binary-i386/. Apart from that, I've built and installed SOPE and OGo trunks. However, none of the binaries run, I get: myung:/home/antony# /usr/local/sbin/ogo-webui-1.1 Uncatched Objective-C exception: exceptionClass Reason: Objective-C runtime error: error: NXConstantString (instance) NXConstantString does not recognize cStringLength UserInfo: no userinfo ### child 4443 (#1) exited with status 1 (#fails=1, uptime=0s). ... myung:/home/antony# /usr/local/sbin/ogo-zidestore-1.5 Uncatched Objective-C exception: exceptionClass Reason: Objective-C runtime error: error: NXConstantString (instance) NXConstantString does not recognize autorelease UserInfo: no userinfo Antony From developer@opengroupware.org Thu Apr 26 00:32:36 2007 From: developer@opengroupware.org (Adam Tauno Williams) Date: Wed, 25 Apr 2007 19:32:36 -0400 Subject: [OGo-Developer] NXConstantString does not recognize... In-Reply-To: <462FE188.8000306@wayforth.co.uk> References: <462FE188.8000306@wayforth.co.uk> Message-ID: <1177543956.4572.2.camel@aleph.whitemice.org> On Thu, 2007-04-26 at 00:17 +0100, Antony Gelberg wrote: > I'm seeing something like > http://www.nabble.com/I-broke-my-OGo!-(upgrade-issue)-t2744059.html > except I've been building from SVN. > I'm using libfoundation-1.1 from > http://download.opengroupware.org/releases/unstable/ThirdParty/sarge/binary-i386/. > > Apart from that, I've built and installed SOPE and OGo trunks. My first question would be - what version of SOPE? TRUNK OGo builds against SOPE 4.6, not trunk SOPE. You checkout SOPE 4.6 from http://svn.opengroupware.org/SOPE/branches/sope-4.6 From developer@opengroupware.org Thu Apr 26 11:51:44 2007 From: developer@opengroupware.org (Antony Gelberg) Date: Thu, 26 Apr 2007 11:51:44 +0100 Subject: [OGo-Developer] NXConstantString does not recognize... In-Reply-To: <1177543956.4572.2.camel@aleph.whitemice.org> References: <462FE188.8000306@wayforth.co.uk> <1177543956.4572.2.camel@aleph.whitemice.org> Message-ID: <46308440.1030702@wayforth.co.uk> Adam Tauno Williams wrote: > On Thu, 2007-04-26 at 00:17 +0100, Antony Gelberg wrote: >> I'm seeing something like >> http://www.nabble.com/I-broke-my-OGo!-(upgrade-issue)-t2744059.html >> except I've been building from SVN. >> I'm using libfoundation-1.1 from >> http://download.opengroupware.org/releases/unstable/ThirdParty/sarge/binary-i386/. >> >> Apart from that, I've built and installed SOPE and OGo trunks. > > My first question would be - what version of SOPE? TRUNK OGo builds > against SOPE 4.6, not trunk SOPE. You checkout SOPE 4.6 from > http://svn.opengroupware.org/SOPE/branches/sope-4.6 > I was using trunk SOPE, but I just cleaned both, grabbed SOPE 4.6, built against that, and it's the same problem. Furthermore, the SOPE tests (which I should have done in the first place :) fail with the same error, so this isn't an OGo issue. antony@myung:~/src/svn/sope-4.6/sope-xml/samples$ saxxml data/slashdot.rss Uncatched Objective-C exception: exceptionClass Reason: Objective-C runtime error: error: NXConstantString (instance) NXConstantString does not recognize cStringLength UserInfo: no userinfo antony@myung:~/src/svn/sope-4.6/sope-xml/samples$ I thought this could be because was missing libobjc-lf2 and libobjc-lf2-dev, but I would have expected configure to complain if a build-dependency was missing. I always had libobjc1 installed. I tried installing libobjc-lf2 and libobjc-lf2-dev, which creates an interesting issue when linking. Making all for tool ldapchkpwd... Compiling file ldapchkpwd.m ... Linking tool ldapchkpwd ... /usr/bin/ld: warning: libobjc.so.lf2, needed by ./../../sope-core/NGExtensions/shared_debug_obj/libNGExtensions.so, may conflict with libobjc.so.1 I think this is a red-herring as Sebastian's libfoundation-1.1 package depends on libobjc1, not libobjc-lf2. His libfoundation-1.0 package depends on libobjc-lf2, but ISTR libfoundation-1.0 is too old for what I want. So I'm still stumped. Antony From developer@opengroupware.org Thu Apr 26 13:06:48 2007 From: developer@opengroupware.org (Antony Gelberg) Date: Thu, 26 Apr 2007 13:06:48 +0100 Subject: [OGo-Developer] Gmane? In-Reply-To: <3D5DB90F-8535-4BBC-B0C2-B59C878E3CA4@opengroupware.org> References: <462F659E.9030904@wayforth.co.uk> <3D5DB90F-8535-4BBC-B0C2-B59C878E3CA4@opengroupware.org> Message-ID: <463095D8.1080307@wayforth.co.uk> Helge Hess wrote: > On Apr 25, 2007, at 16:28, Antony Gelberg wrote: >> Do you have any objection to my submitting this list to gmane? I'm >> using gmane a lot these days, to avoid hoarding mail - the users list is >> there, but I don't see this one. > > Isn't this list already added to Gmane? Personally I don't care, feel > free to add it. > Ok, done so, it's gmane.comp.cms.opengroupware.devel. Do you have access to the message archive in mbox? If so, we can get them imported. Antony From developer@opengroupware.org Thu Apr 26 18:11:33 2007 From: developer@opengroupware.org (Adam Tauno Williams) Date: Thu, 26 Apr 2007 13:11:33 -0400 Subject: [OGo-Developer] NXConstantString does not recognize... In-Reply-To: <46308440.1030702@wayforth.co.uk> References: <462FE188.8000306@wayforth.co.uk> <1177543956.4572.2.camel@aleph.whitemice.org> <46308440.1030702@wayforth.co.uk> Message-ID: <1177607493.4613.15.camel@aleph.whitemice.org> > >> I'm seeing something like > >> http://www.nabble.com/I-broke-my-OGo!-(upgrade-issue)-t2744059.html > >> except I've been building from SVN. > >> I'm using libfoundation-1.1 from > >> http://download.opengroupware.org/releases/unstable/ThirdParty/sarge/binary-i386/. > >> Apart from that, I've built and installed SOPE and OGo trunks. > > My first question would be - what version of SOPE? TRUNK OGo builds > > against SOPE 4.6, not trunk SOPE. You checkout SOPE 4.6 from > > http://svn.opengroupware.org/SOPE/branches/sope-4.6 > I was using trunk SOPE, but I just cleaned both, grabbed SOPE 4.6, built > against that, and it's the same problem. > Furthermore, the SOPE tests (which I should have done in the first place > :) fail with the same error, so this isn't an OGo issue. > antony@myung:~/src/svn/sope-4.6/sope-xml/samples$ saxxml data/slashdot.rss > Uncatched Objective-C exception: > exceptionClass > Reason: Objective-C runtime error: error: NXConstantString (instance) > NXConstantString does not recognize cStringLength > UserInfo: no userinfo > antony@myung:~/src/svn/sope-4.6/sope-xml/samples$ > I thought this could be because was missing libobjc-lf2 and > libobjc-lf2-dev, but I would have expected configure to complain if a > build-dependency was missing. I always had libobjc1 installed. > I tried installing libobjc-lf2 and libobjc-lf2-dev, which creates an > interesting issue when linking. > Making all for tool ldapchkpwd... > Compiling file ldapchkpwd.m ... > Linking tool ldapchkpwd ... > /usr/bin/ld: warning: libobjc.so.lf2, needed by > ./../../sope-core/NGExtensions/shared_debug_obj/libNGExtensions.so, may >