Re: [F-Script-talk] Fwd: Windows with F-script
Brought to you by:
pmougin
From: Andrew W. <wei...@wi...> - 2007-06-02 21:50:56
|
Deivy, You might want to look at resources about the language Smalltalk, from which F-Script is derived. The Smalltalk syntax is very different than most other languages like Java or C++. I would also read the documentation on Apple's developer website, http:// developer.apple.com. Most of the examples in Objective-C can be translated to F-Script without much difficulty. Andrew Weinrich On Jun 2, 2007, at 3:39 PM, Deivy Petrescu wrote: > > Andrew, > thank you very much. > I feel I still have to practice a little more, but you saved me some > time. > I might come back with some more questions in a while. F-script > certainly sounds like a very powerful tool. > I fell I have to mater it. > > Do you have any pointers other than the documentation available on > line? > Thanks again. > > Deivy >> Deivy, >> >> In Objective-C, sometimes small pieces of data like points or >> rectangles are stored as C structs, for reasons of efficiency. In >> Objective-C, they are accessed with the dot operator. F-Script >> translates them into objects (specifically, NSValue objects), which >> are then accessed through methods. So the line of objective-C code: >> >> (newOrigin.y+windowFrame.size.height) > (screenFrame.origin.y >> +screenFrame.size.height) >> >> can be written in F-Script as: >> >> (newOrigin y + windowFrame extent y > (screenFrame origin y + >> screenFrame extent y) >> >> Andrew Weinrich >> >> >> ----- Original Message ----- >> From: Deivy Petrescu <ca...@di...> >> Date: Friday, June 1, 2007 11:04 am >> Subject: [F-Script-talk] Fwd: Windows with F-script >> To: f-s...@li... >> >> >>> Begin forwarded message: >>> >>>> From: Deivy Petrescu <ca...@di...> >>>> Date: May 29, 2007 17:32:41 EDT >>>> To: f-s...@li... >>>> Subject: Windows with F-script >>>> >>>> Hello, >>>> >>>> I am new to F-script and Objective-C. >>>> I am trying to learn both of them now. Also, I normally suck at >>>> writing the UI for any app. >>>> Somehow I am a big fan of faceless apps. >>>> However, I want to write one that really needs a face. >>>> I need to create a window a la Growl, or Application Switcher on >>>> the Mac, with F-Script. >>>> Well, I can do that! However, if I create the window, a borderless >>> >>>> one I can not move it or even get rid of it. >>>> I tried using (Objective-c, Cocoa) code suggested by Apple. But >>>> somethings get stuck. >>>> The code uses a dot language which apparently does not bode well >>>> with F script. >>>> For instance, the line of code: >>>> (newOrigin.y+windowFrame.size.height) > (screenFrame.origin.y >>>> +screenFrame.size.height) >>>> >>>> gets stuck in the "." of newOrigin.y. >>>> >>>> Any hints would be greatly appreciated. >>>> >>>> >>>> Deivy >>>> >>> >>> >>> -------------------------------------------------------------------- >>> - >>> ---- >>> This SF.net email is sponsored by DB2 Express >>> Download DB2 Express C - the FREE version of DB2 express and take >>> control of your XML. No limits. Just data. Click to get it now. >>> http://sourceforge.net/powerbar/db2/ >>> _______________________________________________ >>> F-Script-talk mailing list >>> F-S...@li... >>> https://lists.sourceforge.net/lists/listinfo/f-script-talk >> >> --------------------------------------------------------------------- >> - >> --- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> F-Script-talk mailing list >> F-S...@li... >> https://lists.sourceforge.net/lists/listinfo/f-script-talk > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > F-Script-talk mailing list > F-S...@li... > https://lists.sourceforge.net/lists/listinfo/f-script-talk Andrew Weinrich wei...@cs... http://www.cs.wisc.edu/~weinrich |