Alaska Software Inc. - HTML3 iVars
Username: Password:
AuthorTopic: HTML3 iVars
Vladimir IahnencoHTML3 iVars
on Wed, 08 Sep 2004 22:05:57 -0400
Hi All,
Does HTML3 object have any instance variable(s) for ad-hoc use, like Cargo?
--
Regards,

Vladimir
Thomas Braun Re: HTML3 iVars
on Thu, 09 Sep 2004 10:22:15 +0200
Vladimir Iahnenco wrote:

> Does HTML3 object have any instance variable(s) for ad-hoc use, like Cargo?

I don't think so but you can easily derive your own class from html3 and
use it in your WAA packages.

Thomas Braun
Phil Ide
Re: HTML3 iVars
on Thu, 09 Sep 2004 12:25:12 +0100
Vladimir,

> Does HTML3 object have any instance variable(s) for ad-hoc use, like Cargo?

You can use the cJavaScript ivar if you like.  Here's the low-down on HTML3
and it's parent class IOCACHE:

<< MEMBER VARS >> (it looks like all these are inherited from IOCACHE)
HTML3:cLocation
HTML3:cContentType
HTML3:oBookmark
HTML3:cCookie
HTML3:cJavaScript

<< MEMBER VARS >>
IOCACHE:cContentType
IOCACHE:cJavaScript
IOCACHE:cLocation
IOCACHE:cCookie
IOCACHE:oBookmark


Regards,

Phil Ide

***************************************
* Xbase++ FAQ, Libraries and Sources: *
* goto: http://www.idep.org.uk/xbase  *
***************************************

Don't blame me. I voted for Bill and Opus!
Vladimir IahnencoRe: HTML3 iVars
on Fri, 10 Sep 2004 01:54:33 -0400
Phil,
What happens if we forget to reset cJavaScript back to NIL or NULL_STRING
before RETURN TRUE
1. If cJavaScript is string, it value will be displayd in the document head.
2. If cJavaScript is object IE gets stuck.

As a solution it is possible to set a string between html comment tag
<!--cString-->, it won't affect the page.

--
Regards,

Vladimir


"Phil Ide" <phil@idep.org.uk> wrote in message
news:l0lgmmxry14p.dlg@idep.org.uk...
> Vladimir,
>
> > Does HTML3 object have any instance variable(s) for ad-hoc use, like
Cargo?
>
> You can use the cJavaScript ivar if you like.  Here's the low-down on
HTML3
> and it's parent class IOCACHE:
>
> << MEMBER VARS >> (it looks like all these are inherited from IOCACHE)
> HTML3:cLocation
> HTML3:cContentType
> HTML3:oBookmark
> HTML3:cCookie
> HTML3:cJavaScript
>
> << MEMBER VARS >>
> IOCACHE:cContentType
> IOCACHE:cJavaScript
> IOCACHE:cLocation
> IOCACHE:cCookie
> IOCACHE:oBookmark
>
>
> Regards,
> --
> Phil Ide
>
> ***************************************
> * Xbase++ FAQ, Libraries and Sources: *
> * goto: http://www.idep.org.uk/xbase  *
> ***************************************
>
> Don't blame me. I voted for Bill and Opus!
Phil Ide
Re: HTML3 iVars
on Fri, 10 Sep 2004 11:55:22 +0100
Vladimir,

> What happens if we forget to reset cJavaScript back to NIL or NULL_STRING
> before RETURN TRUE
> 1. If cJavaScript is string, it value will be displayd in the document head.
> 2. If cJavaScript is object IE gets stuck.
> 
> As a solution it is possible to set a string between html comment tag
> <!--cString-->, it won't affect the page.

There are lots of ways around this, and that solution looks good.  However
I'd be more tempted to create another mechanism within the code (e.g. a
globally visible object) to store temporary data.

If you see how I do things with HAL, a form-function is always a wrapper to
another function:

Function CNResOther2Submit( oHtml, oContext )
   if SessionBegin(oHtml,oContext)
      ResOther2Submit(oHtml,oContext)
   endif
   SessionEnd(oHtml,oContext)
   return (TRUE)

The SessionBegin() function opens default tables, sets up the environment,
creates the HAL stack and document objects etc.

SessionEnd() creates the document as text from the HAL object, tidies it,
send it back to WAA/Xb2.NET, close tables etc.

It would be easy for me to add a line of code that ensured
oHtml:cJavaScript was NIL before ending.

Regards,

Phil Ide

***************************************
* Xbase++ FAQ, Libraries and Sources: *
* goto: http://www.idep.org.uk/xbase  *
***************************************

MacIntosh: Computer With Training Wheels You Can't Remove
Vladimir IahnencoRe: HTML3 iVars
on Fri, 10 Sep 2004 09:22:38 -0400
Phil,
Your method looks great. I'm also using Context, global hash object,
user+waa_package related hash object. I even send unique cookie at login and
read/check it to ensure context object works fine.
But as iVar Cargo exists in almost all XbParts we may have found a thousand
different implementations when we could use it, for example as a waa thread
local parameters hash to transfer from one routines to another with no
obligation to clean it up.

--
Regards,

Vladimir


"Phil Ide" <phil@idep.org.uk> wrote in message
news:ubsnj0o1w8b9.dlg@idep.org.uk...
> Vladimir,
>
> > What happens if we forget to reset cJavaScript back to NIL or
NULL_STRING
> > before RETURN TRUE
> > 1. If cJavaScript is string, it value will be displayd in the document
head.
> > 2. If cJavaScript is object IE gets stuck.
> >
> > As a solution it is possible to set a string between html comment tag
> > <!--cString-->, it won't affect the page.
>
> There are lots of ways around this, and that solution looks good.  However
> I'd be more tempted to create another mechanism within the code (e.g. a
> globally visible object) to store temporary data.
>
> If you see how I do things with HAL, a form-function is always a wrapper
to
> another function:
>
> Function CNResOther2Submit( oHtml, oContext )
>    if SessionBegin(oHtml,oContext)
>       ResOther2Submit(oHtml,oContext)
>    endif
>    SessionEnd(oHtml,oContext)
>    return (TRUE)
>
> The SessionBegin() function opens default tables, sets up the environment,
> creates the HAL stack and document objects etc.
>
> SessionEnd() creates the document as text from the HAL object, tidies it,
> send it back to WAA/Xb2.NET, close tables etc.
>
> It would be easy for me to add a line of code that ensured
> oHtml:cJavaScript was NIL before ending.
>
> Regards,
> --
> Phil Ide
>
> ***************************************
> * Xbase++ FAQ, Libraries and Sources: *
> * goto: http://www.idep.org.uk/xbase  *
> ***************************************
>
> MacIntosh: Computer With Training Wheels You Can't Remove
Phil Ide
Re: HTML3 iVars
on Mon, 13 Sep 2004 13:41:23 +0100
Vladimir,

> Your method looks great. I'm also using Context, global hash object,
> user+waa_package related hash object. I even send unique cookie at login and
> read/check it to ensure context object works fine.
> But as iVar Cargo exists in almost all XbParts we may have found a thousand
> different implementations when we could use it, for example as a waa thread
> local parameters hash to transfer from one routines to another with no
> obligation to clean it up.

I create a STATIC array, that has one element for each thread.  When I
enter the SessionBegin() function, I initialise the lement for the current
thread with an object which stores all 'public' data that I only want
visible in the current thread.

Regards,

Phil Ide

***************************************
* Xbase++ FAQ, Libraries and Sources: *
* goto: http://www.idep.org.uk/xbase  *
***************************************

SENILE.COM found... Out Of Memory...