[jawsscripts] Re: interesting observations re: graphicsListHelper

  • From: Jackie McBride <abletec@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Fri, 20 Aug 2010 10:57:52 -0700

Yeah, I know, but if the thing is supposed to return an int, why is it
declared as void?

On 8/20/10, Jon Squally <jonsqually@xxxxxxxxx> wrote:
> Hello
> The GraphicsListHelper function looks fine.  The first return deals with the
> graphics that are grayed.  The second return returns once the information
> has been obtained from the graphic.  Keep in mind that the function called
> in the function using GraphicsEnumerate does not have to return one specific
> value.  The return just determines whether the enumeration continues.  This
> is the same with EnumerateChildWindows.
>
> Regards, Jon.
>
> -----Original Message-----
> From: jawsscripts-bounce@xxxxxxxxxxxxx
> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Dean Masters
> Sent: Friday, August 20, 2010 10-25 AM
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] Re: interesting observations re: graphicsListHelper
>
> It's all Greek to me so I'm blown away with just the FSDN which I can't make
>
> heads or tails out of.
>
> Dean
>
> ----- Original Message -----
> From: "Jackie McBride" <abletec@xxxxxxxxx>
> To: "jawsscripts" <jawsscripts@xxxxxxxxxxxxx>
> Sent: Friday, August 20, 2010 1:09 PM
> Subject: [jawsscripts] interesting observations re: graphicsListHelper
>
>
> | Strange how teaching brings one's powers of observation to the
> | forefront. Yall look at this!
> |
> | Per the FSDN regarding GraphicsEnumerate():
> | Param 2:
> | Type: String
> | Description: The name of the function to be called with information
> | about each graphic in the window. This function should return TRUE if
> | the enumeration is allowed to continue, FALSE if the enumeration
> | should stop immediately. This function should be defined as: int
> | Function SomeName(int nLeft,int nTop,int nRight,int nBottom).
> | Include: Required
> |
> | Sounds reasonable. However, in the default.jss file for Jaws 11, we have
> this:
> | GraphicsEnumerate(GetAppMainWindow(GetFocus()),"GraphicsListHelper")
> |
> | Still sounds fine, until we get to GraphicsListHelper(), which is
> | defined as follows:
> | void Function GraphicsListHelper(int nLeft,int nTop,int nRight,int
> nBottom)
> |
> | & then, to add to the weirdness, we have 2 return statements in the
> | function, both of which return an integer (they will be starred)
> |
> | SaveCursor()
> | InvisibleCursor()
> | MoveTo (nLeft,nBottom-1)
> | if GetControlAttributes() & CTRL_GRAYED then
> | ;skip this graphic
> | * return TRUE
> | endIf
> | let g_strGraphicsList = g_strGraphicsList+LIST_ITEM_SEPARATOR+GetWord()
> | let g_strGraphicsListX = g_strGraphicsListX + LIST_ITEM_SEPARATOR+
> | IntToString(getCursorRow())
> | let g_strGraphicsListY = g_strGraphicsListY + LIST_ITEM_SEPARATOR+
> | IntToString(getCursorCol())
> | RestoreCursor()
> | * return 1
> | EndFunction
> |
> | What the firetruck? How'd that even compile? I am just totally blown
> | away. Has any1 ever noticed this b4?
> |
> | Your friend in the Scripting Twilight Zone. I'm thinkin *this should a
> | been Friday the 13th, given the way this feels! Any1 got any insight?
> | That aint even right!
> |
> | --
> | Change the world--1 deed at a time
> | Jackie McBride
> | Scripting Classes: http://jawsscripting.lonsdalemedia.org
> | homePage: www.abletec.serverheaven.net
> | For technophobes: www.technophoeb.com
> | __________�
> |
> | View the list's information and change your settings at
> | //www.freelists.org/list/jawsscripts
> |
>
>
> __________�
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
>
> __________�
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
>
>


-- 
Change the world--1 deed at a time
Jackie McBride
Scripting Classes: http://jawsscripting.lonsdalemedia.org
homePage: www.abletec.serverheaven.net
For technophobes: www.technophoeb.com
__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: