f-script-talk Mailing List for F-Script (Page 7)
Brought to you by:
pmougin
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
(4) |
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(3) |
Feb
(1) |
Mar
(2) |
Apr
(8) |
May
(12) |
Jun
(3) |
Jul
(5) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(4) |
2003 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
(14) |
Jun
(5) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
(2) |
Nov
(2) |
Dec
|
2004 |
Jan
(3) |
Feb
(9) |
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
(3) |
Aug
(3) |
Sep
(11) |
Oct
(29) |
Nov
|
Dec
(3) |
2005 |
Jan
(8) |
Feb
(12) |
Mar
|
Apr
(1) |
May
(31) |
Jun
|
Jul
(7) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(2) |
2006 |
Jan
(13) |
Feb
(1) |
Mar
(5) |
Apr
(3) |
May
(1) |
Jun
(13) |
Jul
(2) |
Aug
(22) |
Sep
(15) |
Oct
(1) |
Nov
(1) |
Dec
|
2007 |
Jan
(7) |
Feb
(3) |
Mar
(2) |
Apr
(5) |
May
|
Jun
(6) |
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
(3) |
Nov
(12) |
Dec
(5) |
2008 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(2) |
May
(4) |
Jun
(31) |
Jul
(9) |
Aug
(10) |
Sep
(3) |
Oct
(4) |
Nov
|
Dec
|
2009 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Giovanni G. <jj...@ob...> - 2006-08-25 19:00:26
|
On 24/ago/06, at 12:07, Philippe Mougin wrote: > >> NSObject subclass:'MyClass' instanceVariableNames:'a b c' > MyClass > >> MyClass setFSBlock:[:self :_cmd| 'Method ' ++ _cmd ++ ' called on ' > ++ self printString] asInstanceMethod:#method1 > >> myInstance := MyClass alloc init > >> myInstance method1 > 'Method method1 called on <MyClass: 0x4bb69c0>' > > Using the setFSBlock... methods you can also add methods to existing > Cocoa classes. Nice! How can access to instance variable inside methods block? I tried with (self a) without so much success. Even valueForKey: didn't work :| -- [ [ [ JJ ] ] ] | When you encounter seemingly good advice | that contradicts other seemingly good advice, http://www.siforge.org | ignore them both. Al Franken |
From: Nathan S. <nat...@jp...> - 2006-08-25 15:47:14
|
On Aug 25, 2006, at 12:38 AM, Giovanni Giorgi wrote: > > How can be difficult to make FScript multi-platform? > For instance, If we can have a stripped down version of FScript > written in Java or C++, we can spread it also on Linux and Windows. > It needn't to offer the same feature. Even the simple interpreter > with a Plugin Architecture to extend it would be a strong starting > point. > What do you think? > Wouldn't GNUStep make more sense? -N |
From: Giovanni G. <dai...@gm...> - 2006-08-25 07:38:39
|
Hi! I have found FScript very nice for a bunch of reasons: - It is quite compact, in respect also to tiny Smalltalks like GNU Smalltalk and PocketSmalltalk. It is uncommon to find such compact things in SmallTalk land. - It has interesting feature like sending message to arrays in one instruction - Very easy to extend via the Cocoa Framework. - Open Source I have searched a "smaller" SmallTalk in the last few years but without so much success. I have counted between 43000 and 60000 lines of code. The Core Objective C part is 43000 lines FSCompiler.m is used to generate byte code? So FScript has also byte-code interpretation?! How can be difficult to make FScript multi-platform? For instance, If we can have a stripped down version of FScript written in Java or C++, we can spread it also on Linux and Windows. It needn't to offer the same feature. Even the simple interpreter with a Plugin Architecture to extend it would be a strong starting point. What do you think? -- Software Architect http://www.objectsroot.com/ Software is nothing |
From: Philippe M. <pm...@ac...> - 2006-08-24 10:06:13
|
Le 24 ao=FBt 06 =E0 11:48, Giovanni Giorgi a =E9crit : > Thank you very much! > > I have poked around the Cocoa library and seems very simple to use > with FScript :) > > Is planned some new extension to the language for creating small > classes in Fscript language itself? There is preliminary support for this, with a few limitations (no =20 call to super, access to instances variable through KVC...). A more =20 complete solution will eventually be provided. Here is a basic example where we create a new subclass of NSObject, =20 named MyClass, with three instance variables named a, b and c, and =20 define a simple method named method1: > NSObject subclass:'MyClass' instanceVariableNames:'a b c' MyClass > MyClass MyClass > MyClass setFSBlock:[:self :_cmd| 'Method ' ++ _cmd ++ ' called on ' ++ self printString] asInstanceMethod:#method1 > myInstance :=3D MyClass alloc init > myInstance method1 'Method method1 called on <MyClass: 0x4bb69c0>' Using the setFSBlock... methods you can also add methods to existing =20 Cocoa classes. For another approach, look at KFDecorator, from Ken Ferry at: http://homepage.mac.com/kenferry/software.html#KFDecorator > There are FScript porting to other O.S. for instance Linux and =20 > Windows? None that I'm aware of. Best, Philippe |
From: Giovanni G. <dai...@gm...> - 2006-08-24 09:48:33
|
Thank you very much! I have poked around the Cocoa library and seems very simple to use with FScript :) Is planned some new extension to the language for creating small classes in Fscript language itself? There are FScript porting to other O.S. for instance Linux and Windows? On 8/24/06, Philippe Mougin <pm...@ac...> wrote: > > Le 24 ao=FBt 06 =E0 10:44, Felix Franz a =E9crit : > > [...] > > > > >> And how is possible to execute arbitrary shell commands (something > >> like the exec() or system() C function)? > > > > The cocoa-way would be to use NSTask: > > > >> task :=3D NSTask launchedTaskWithLaunchPath:'/bin/ls' arguments: > >> NSArray array > > > > launches /bin/ls . > > > > See http://developer.apple.com/documentation/Cocoa/Reference/ > > Foundation/ObjC_classic/index.html > > for the glory details. > > > > In addition, creating an Objective-C wrapper for a function like > system() and loading it in F-Script (see section 11 in the F-Script > guide) would be trivial (if you can program in Objective-C). > Something like this in Objective-C: > > -(int)executeInShell:(NSString *)str > { > return system([str UTF8String]); > } > > Best, > > Philippe > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job ea= sier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim= o > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > F-Script-talk mailing list > F-S...@li... > https://lists.sourceforge.net/lists/listinfo/f-script-talk > --=20 Software Architect http://www.objectsroot.com/ Software is nothing |
From: Philippe M. <pm...@ac...> - 2006-08-24 09:09:50
|
Le 24 ao=FBt 06 =E0 10:44, Felix Franz a =E9crit : [...] > >> And how is possible to execute arbitrary shell commands (something >> like the exec() or system() C function)? > > The cocoa-way would be to use NSTask: > >> task :=3D NSTask launchedTaskWithLaunchPath:'/bin/ls' arguments: =20 >> NSArray array > > launches /bin/ls . > > See http://developer.apple.com/documentation/Cocoa/Reference/=20 > Foundation/ObjC_classic/index.html > for the glory details. > In addition, creating an Objective-C wrapper for a function like =20 system() and loading it in F-Script (see section 11 in the F-Script =20 guide) would be trivial (if you can program in Objective-C). =20 Something like this in Objective-C: -(int)executeInShell:(NSString *)str { return system([str UTF8String]); } Best, Philippe |
From: Felix F. <fe...@gm...> - 2006-08-24 08:44:39
|
> Hi all, > I am a very strong Squeak fan and I liked a lot FScript. me too :) > I decided to use Fscript to write some small front-end script. > I have two question. > There is a simple way of creating an associative array? > Something which will be able to do: > dic at:'a' put:'aValue' > ? you can use a NSMutableDictionary: > dict := NSMutableDictionary new > dict setObject: 'foo' forKey: 'bar' > dict objectForKey: 'bar' 'foo' > And how is possible to execute arbitrary shell commands (something > like the exec() or system() C function)? The cocoa-way would be to use NSTask: > task := NSTask launchedTaskWithLaunchPath:'/bin/ls' arguments: NSArray array launches /bin/ls . See http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/index.html for the glory details. Hope this helps, felix > Thank you very much! > -- > [ [ [ JJ ] ] ] | Temi cio' che conosci, non > | cio' che non conosci > http://www.siforge.org | > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > F-Script-talk mailing list > F-S...@li... > https://lists.sourceforge.net/lists/listinfo/f-script-talk -- . "Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail |
From: Giovanni G. <jj...@ob...> - 2006-08-23 20:40:07
|
Hi all, I am a very strong Squeak fan and I liked a lot FScript. I decided to use Fscript to write some small front-end script. I have two question. There is a simple way of creating an associative array? Something which will be able to do: dic at:'a' put:'aValue' ? And how is possible to execute arbitrary shell commands (something like the exec() or system() C function)? Thank you very much! -- [ [ [ JJ ] ] ] | Temi cio' che conosci, non | cio' che non conosci http://www.siforge.org | |
From: Philippe M. <pm...@ac...> - 2006-07-31 18:28:42
|
The release candidate announced here a few days ago has been released as F-Script 1.3.4. You can download F-Script 1.3.4 from: http://www.fscript.org/download/download.htm Enjoy, Philippe Mougin |
From: Philippe M. <pmo...@ho...> - 2006-07-18 22:11:33
|
F-Script 1.3.4 release candidate is now available for download and test. Binaries + documentation: http://www.fscript.org/download/FScriptBin-20060707.tar.gz Sources: http://www.fscript.org/download/FScriptSources-20060707.tar.gz I plan to publicly announce the release if no major problem is found in this candidate version. Please, test and report problems ASAP. Philippe _________________________________________________________________ Découvrez Windows Live Messenger : le futur de MSN Messenger ! www.windowslivemessenger.fr |
From: Philippe M. <pm...@ac...> - 2006-06-27 15:52:29
|
Le 26 juin 06 =E0 19:26, stephen white a =E9crit : > On 26/06/2006, at 10:28 PM, Philippe MOUGIN wrote: >> "Exploring Cocoa with F-Script" at: >> http://www.fscript.org/documentation/ExploringCocoaWithFScript/=20 >> index.htm > > Good read! Thanks! > How do I explore running programs with F-Script? :) 1) Launch the Cocoa application you want to explore. 2) Launch the F-Script Anywhere application (it is included in the F-=20 Script distribution). 3) Follow the instructions. Enjoy, Philippe |
From: stephen w. <st...@ad...> - 2006-06-26 18:35:29
|
On 26/06/2006, at 10:28 PM, Philippe MOUGIN wrote: > "Exploring Cocoa with F-Script" at: > http://www.fscript.org/documentation/ExploringCocoaWithFScript/ > index.htm Good read! How do I explore running programs with F-Script? :) -- st...@ad... |
From: Philippe M. <phi...@wa...> - 2006-06-26 12:58:50
|
"Exploring Cocoa with F-Script" at: http://www.fscript.org/documentation/ExploringCocoaWithFScript/index.htm Enjoy, Philippe Mougin |
From: Philippe M. <pmo...@ho...> - 2006-06-23 17:00:28
|
Bryan Woods wrote : >Philippe MOUGIN wrote: >>You'll also probably need to call the method "symbolForIndex:" as part of >>your own implementation of "valueForIndex:isDefined:" in order to get the >>name of the variable being looked-up. >I assume this will fail if the variable hasn't been defined yet. In the context of these methods, "defined" means that an object has been assigned to the variable. In this context, calling "symbolForIndex:" for a variable that is not yet "defined" will NOT fail (given a valid FSContextIndex argument). A variable can be known by the interpreter, even if the variable is not yet defined. Best, Philippe _________________________________________________________________ Découvrez Windows Live Messenger : le futur de MSN Messenger ! www.windowslivemessenger.fr |
From: Bryan W. <woo...@gm...> - 2006-06-20 16:35:48
|
Philippe MOUGIN wrote: > You'll also probably need to call the method "symbolForIndex:" as part of your own implementation of "valueForIndex:isDefined:" in order to get the name of the variable being looked-up. I assume this will fail if the variable hasn't been defined yet. > Note that these methods are not part of the public F-Script API and might change in > future versions. > Understood. |
From: Philippe M. <phi...@wa...> - 2006-06-20 14:07:53
|
> But is there a reason that the KVC for the variable names > and references to super could not be easily done in the compiler? No. It's just that it is not implemented yet. > Each F-Script class could have a base class, either an objective-C > class or a previously defined Smalltalk class and two additional > dictionaries for added member variables and methods. If you then hook > into the compiler, KVC for the variables could be done automatically > and super would be available as well. The compiler would just have to > distinguish if it is still at the Smalltalk layer for resolving > symbols or already at the boundary to Objective-C. > Does that make sense? Yes. However, given that the Objective-C runtime offers support for dynamically creating classes (with instance variables), adding methods and so on, I think it would be better to use it directly. Philippe |
From: Rainer K. <dri...@ma...> - 2006-06-20 11:42:19
|
Hi Philippe, > > Yes. Actually the KFDecorator module adopts this kind of approach > (see http://homepage.mac.com/kenferry/software.html#KFDecorator). Yep, I had found KFDecorator (sorry for not mentioning) but was missing a way to add member variables. But I hadn't seen JGType, thanks for the pointer! > > There are several limitations in the current implementation: no > direct access to instances variables (you have to use KVC), no > support for calling super etc. understood. But is there a reason that the KVC for the variable names and references to super could not be easily done in the compiler? Each F-Script class could have a base class, either an objective-C class or a previously defined Smalltalk class and two additional dictionaries for added member variables and methods. If you then hook into the compiler, KVC for the variables could be done automatically and super would be available as well. The compiler would just have to distinguish if it is still at the Smalltalk layer for resolving symbols or already at the boundary to Objective-C. Does that make sense? > > The saveSpace and loadSpace methods of the class System let you save > or load an entire workspace. Not really the same as an image, though. Yep, have found that as well (again sorry for not mentioning). But image and changes file would be shared between multiple open workspaces, changes would grow by both and in my mind the image would be part of the resources of the application (once modified probably stored in the users Library/Application Support folder and loaded automatically on app startup). Does anybody have an idea in which classes to look to get an idea how iamge and changes file are maintained for example in Squeak? > > Best, > > Philippe Thanks for the quick answer and pointers! Rainer |
From: Philippe M. <phi...@wa...> - 2006-06-20 09:27:12
|
The F-Script interpreter uses the method "valueForIndex:isDefined:" (implemented by the SymbolTable class) to do variable lookup. This is probably the method you are looking for. You'll also probably need to call the method "symbolForIndex:" as part of your own implementation of "valueForIndex:isDefined:" in order to get the name of the variable being looked-up. Note that these methods are not part of the public F-Script API and might change in future versions. Feel free to ask if you need additional information. Best, Philippe |
From: Bryan W. <woo...@gm...> - 2006-06-19 23:15:45
|
I'm using F-script as the “underlying computation engine” for a application I’m working on. I've been able to make slight modifications to F-script’s behavior using Categories and poseAsClass: until now and I need some guidance. I need to intercept F-script’s variable lookup mechanism to catch whenever my special “range syntax” is used. That is, whenever variable a1_a12 is referenced I need to catch the lookup and invoke special code (that returns an array of variables a1 -> a10) because a1_a10 doesn't actually exist and is being used as a shorthand for this kind of behavior. I originally attempted to override -[FSinterpreter objectForIdentifier:found:] only to discover that the interpreter doesn't use that method internally. I then downloaded the source and found the existence of the SymbolTable class. Which brings me to my question: What SymbolTable method(s) should I override to do what I’m trying to accomplish? So far F-script’s integration with Cocoa/Objc has made making these kind of customizations a dream. I’m hoping that my luck continues. Thanks, Bryan |
From: Philippe M. <pm...@ac...> - 2006-06-19 21:00:47
|
Le 19 juin 06 =E0 16:25, Rainer Keller a =E9crit : > Hi all, > > I just found F-Script a few days ago and was going through the > tutorials and reading up what I could find. I also tried looking at > the list archives, but I get an error when I do that: > "Private archive file not found" Yes, the mailing list has recently suffered several problems =20 following a change of the underlying system. SourceForge, which is =20 operating the mailing list, has been made aware of the problem with =20 the archive and it should be fixed very soon now. > I did subscribe to the list and confirmed, so I think I am properly > registered. > > Now what I wanted to search for was creating classes, having an image > and a changes file. > > For creating classes at least for debugging and experimentation (aka > hacking ;) I thought it should be possible to create an Objective-C > class for the "Metaclass". Well, I am probably misunderstanding the > Metaclass concept still, but this is what I was thinking of: > Just a class with one member that has 2 NSDictionaries, one for the > members and one for the methods. make sure that it catches all > unknown methods which get sent to it and then looks them up in your > dictionary. Would that be possible? Yes. Actually the KFDecorator module adopts this kind of approach =20 (see http://homepage.mac.com/kenferry/software.html#KFDecorator). Note that F-Script also has a built-in experimental support for =20 creating classes (this functionality is implemented in the JGType =20 class). It uses the Objective-C runtime functions in order to create =20 "real" Objective-C classes on the fly. Here is a basic example where =20 we create a new subclass of NSObject, named MyClass, with three =20 instance variables named a, b and c, and define a simple method named =20= method1: > NSObject subclass:'MyClass' instanceVariableNames:'a b c' MyClass > MyClass MyClass > MyClass setFSBlock:[:self :_cmd| 'Method ' ++ _cmd ++ ' called on =20 ' ++ self printString] asInstanceMethod:#method1 > myInstance :=3D MyClass alloc init > myInstance method1 'Method method1 called on <MyClass: 0x4bb69c0>' There are several limitations in the current implementation: no =20 direct access to instances variables (you have to use KVC), no =20 support for calling super etc. > For having an image and a changes file there might be a conflict if > multiple interpreters are running, at least you would need to find > some logic, which I could probably look up in other Smalltalks. The saveSpace and loadSpace methods of the class System let you save =20 or load an entire workspace. Not really the same as an image, though. Best, Philippe > I thought somebody probably had these ideas and wishes before, but > didn't see anything on the website and had no luck with the list > archive. Could someone kindly give me a few pointers where to look or > point out why this is silly/won't work? > > Best regards! > Rainer Keller |
From: Rainer K. <dri...@ma...> - 2006-06-19 14:25:37
|
Hi all, I just found F-Script a few days ago and was going through the tutorials and reading up what I could find. I also tried looking at the list archives, but I get an error when I do that: "Private archive file not found" I did subscribe to the list and confirmed, so I think I am properly registered. Now what I wanted to search for was creating classes, having an image and a changes file. For creating classes at least for debugging and experimentation (aka hacking ;) I thought it should be possible to create an Objective-C class for the "Metaclass". Well, I am probably misunderstanding the Metaclass concept still, but this is what I was thinking of: Just a class with one member that has 2 NSDictionaries, one for the members and one for the methods. make sure that it catches all unknown methods which get sent to it and then looks them up in your dictionary. Would that be possible? For having an image and a changes file there might be a conflict if multiple interpreters are running, at least you would need to find some logic, which I could probably look up in other Smalltalks. I thought somebody probably had these ideas and wishes before, but didn't see anything on the website and had no luck with the list archive. Could someone kindly give me a few pointers where to look or point out why this is silly/won't work? Best regards! Rainer Keller |
From: Philippe M. <pm...@ac...> - 2006-06-12 08:05:25
|
The release candidate announced here a few days ago has been released as "F-Script 1.3.3". Release notes are available on-line at: http://www.fscript.org/releaseNotes/ You can download F-Script 1.3.3 from: http://www.fscript.org/download/download.htm Enjoy, Philippe Mougin |
From: Philippe M. <pm...@ac...> - 2006-06-03 23:25:28
|
F-Script 1.3.3 release candidate is now available for download and test. Binaries + documentation: http://www.fscript.org/download/FScriptBin-20060604.tar.gz Sources: http://www.fscript.org/download/FScriptSources-20060604.tar.gz I plan to publicly announce the release in a few days if no major problem is found in this release candidate. Please, test and report problems ASAP. Enjoy! Philippe Mougin |
From: Philippe M. <pm...@ac...> - 2006-05-10 20:25:39
|
A new, mach_inject-based version of F-Script Anywhere has been released by Robert Chin. This version works on PPC and Intel. http://osiris.laya.com/blog/?p=18 Best, Philippe Mougin |
From: Philippe M. <pm...@ac...> - 2006-04-08 15:52:27
|
Hi Sarat, At first glance, it seems that the way you construct a distributed =20 array from n undistributed ones using the pickBlock reduction will =20 not give you a perfect distribution (it gives a good one if n =3D 2, =20 but for n > 2 the elements are no longer uniformly distributed). Here is a version which I think gives a better distribution. [:results| categoryResults :=3D results at: @ ((results objectForKey:'Category') =3D = =20 @((results objectForKey:'Category') distinct)). categorySiteResults :=3D [:a| Sites:=3D (a objectForKey:'Site') = distinct. =20 a at: @((a objectForKey:'Site') =3D @Sites)] value: @categoryResults. distribute :=3D [:undistributed| pick :=3D [:a| a count > 0 ifTrue:[container add:(a at:0). a =20 removeAt:0]]. container :=3D {}. [undistributed @count =3D 0 \ #&] whileFalse:[pick =20 value:@undistributed]. container ]. distributedCategoryResults :=3D distribute value:@categorySiteResults. distributedResults :=3D distribute value:distributedCategoryResults. distributedResults ] Now, you can select the 10 first rows by doing: selected :=3D distributedResults at: 10 iota. You can get them sorted by category (and by site for each category) =20 by doing: selected :=3D selected at:(selected objectForKey:'Site') sort. selected :=3D selected at:(selected objectForKey:'Category') sort. -- -- Philippe Le 4 avr. 06 =E0 05:01, Sarat Kongara a =E9crit : > Hi Guys, > A couple of weeks ago I was trying to solve this problem of > distributing results from different categories & sites to a fixed > number of rows. This is similar to the way Spotlight uniformly > distributes the search results in the menu like display. So you see > results from each category (Photos, Documents, Folders, Music, Mail, > etc). The case I was trying to solve is a little complicated because > each result has an additional attribute "Site" apart from the > "Category". > > Here is what I like to do. Say I have 10 rows to display the seach > results and I get 40 results that match the search criteria. I want to > make sure I display results uniformly from each Category and then > uniformly across Sites in each category. > > F-Script seemed like a perform fit for these kinds of problems. > > Here is the code I came up with so far > > [:results | > categoryResults :=3D results at: @ ((results objectForKey:'Category') = =3D > @((results objectForKey:'Category') distinct)). > categorySiteResults :=3D [:a| Sites:=3D (a objectForKey:'Site') = distinct. > a at: @((a objectForKey:'Site') =3D @Sites)] value: @categoryResults. > addBlock :=3D [:container :source | container addObject:(source > objectAtIndex:0). source removeObjectAtIndex:0]. > alternatePickBlock :=3D [:a :b | container :=3D NSMutableArray array. = [ > ((a count) > 0) | ((b count) > 0) ] whileTrue: [(a count) > 0 > ifTrue:[addBlock value:container value:a]. (b count) > 0 > ifTrue:[addBlock value:container value:b] ]. container]. > distributedCategoryResults :=3D categorySiteResults @ \ =20 > alternatePickBlock. > distributedResults :=3D distributedCategoryResults \ = alternatePickBlock. > distributedResults > ] > > The input argument to this block is the array of search results. Each > result is a dictionary (the two important keys are Category and Site). > > Is there a better way to do this? Thanks. > > Regards > Sarat > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting =20 > language > that extends applications into web and mobile media. Attend the =20 > live webcast > and join the prime developer group breaking into this new coding =20 > territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=110944&bid$1720&dat=121642= > _______________________________________________ > F-Script-talk mailing list > F-S...@li... > https://lists.sourceforge.net/lists/listinfo/f-script-talk > |