Michael Kaye | 1 May 2008 01:02
Picon
Gravatar

Re: More 4DAF questions

Rudi,

yes that make sense. So basically I will just use compile.js (with  
callback and localisation files) and I will have everything I need  
with smallest possible footprint.

Thanks again.

Regards, Michael.

On 30 Apr 2008, at 23:51, Rudolf Psenicnik wrote:

> 1) Framework.js will load uncompressed framework files, while  
> compile.js loads minified version as one file. Using both in the  
> same time is redundant since it contains same code, and good  
> practice is to use compile.js while developing and deploying  
> application, and use framework.js when submitting bugs regarding  
> 4DAF because errors are much more readable.
>
> Think of framework.js as interpreted app and compile.js as compiled  
> app. In both cases, don't include dax.js, since that file has 4DAF  
> client-specific code. Also, framework.js and compile.js don't  
> interact or call each other, and work whether the other one is  
> present or not.
>
> 2) Compile.js requires callback and at least one language  
> localization file.
>
> 3) You can apply it on per 'web app' basis, just make sure that each  
> web app links to different framework.js file, although I would just  
(Continue reading)

John Baughman | 1 May 2008 02:35
Picon

Re: Runtime error Line # 0, Accessing a parameter that does not exist (compiled only)

David,

	I don't get what you are doing. It looks to me like you are trying to  
declare $1 as a longint but use it as a string. It cannot be both.  
Besides  the fact that you are testing it as a string with the if  
statement you are passing $1 as the first parameter to New Process in  
which case it has to be a string.

John

On Apr 30, 2008, at 11:18 AM, David Ringsmuth wrote:

> If ($1="SpecificProcedure ")
>
>                $processID:=New process($1;1024*96;$2;0)
>
> Else
>
>                $processID:=New process($1;1024*96;$2)
>
> End if

> It specifically declares $1 as a Longint.
**********************************************************************
An all-new List box. More features, more power.
Headers, footers, cell formatting and other goodies.
See it here first! http://www.4d.com/livedemos

4th Dimension Internet Users Group (4D iNUG)
FAQ:  http://www.4d.com/support/faqnug.html
(Continue reading)

Douglas von Roeder | 1 May 2008 02:37
Picon

Re: Runtime error Line # 0, Accessing a parameter that does not exist (compiled only)

What is the compiler declaration for $2.

On Wed, Apr 30, 2008 at 1:42 PM, David Ringsmuth <davidinug@...> wrote:

> If ($1="SpecificProcedure ")
>
>                $processID:=New process($1;1024*96;$2;0)
>
> Else
>
>                $processID:=New process($1;1024*96;$2)
>
> End if
>
>
>
> In this method used to launch new processes throughout the system, there
> is
> one procedure launch that is failing compiled, throwing the error stated
> in
> the subject.
>
>
>
> The failing launch process has provision to work with or without a $1
> passed
> to it. It specifically declares $1 as a Longint. The launched process
> accesses no other parameters. When launched using this call without a $1
> 4D
> returns the error in the subject. When launched with a numeric $1 4D does
(Continue reading)

David Ringsmuth | 1 May 2008 03:27

RE: Runtime error Line # 0, Accessing a parameter that does not exist (compiled only)

Spencer, John, Douglas,

Thanks for responding. In the code below $1 and $2 must both be strings
because they are parameters in the "New process" function. $2 here is the
name given to new process. 

It is the 4th parameter (absent in the second "New Process" below) that
throws the error. In the first "New process" a "0" works as the 4th
parameter.

if ($1="SpecificProcedure ")
     $processID:=New process($1;1024*96;$2;0)  `4th parameter here ("0")
works for this launch
Else
     $processID:=New process($1;1024*96;$2)  `<--No 4th Parameter here
causes the error
End if

The new process function passes the 4th parameter as $1 into the spawned
process. The new process uses the optional $1 defined as a longint, and
references no other parameters, except $0 which it returns when the method
is called as a method instead of a process. 
The way the code is now written works with no error, but does not make
sense.

What say you?

Thanks,
David

(Continue reading)

Paul Mohammadi | 1 May 2008 05:15
Picon

Re: HLs and efficiency

By HL you mean Hierarchical Lists? Without knowing how many records
you're interested in showing, the answer depends.

If you're talking about thousands of records then this is a bad
idea... first you have to do a SELECTION TO ARRAY, then you will use
the arrays to build the list on the client.. so you have a double
memory penalty, one to build the array and one to build the list.   I
tested HLs with 16000 list items, the performance was very acceptable
but I did notice the memory foot print is rather large.  It seems each
list item will end up using 255 char's worth of memory regardless if
it is used or not. (I am not sure).  the server penalty is that the
server is constantly busy building display arrays.. hardly an
efficient use of server time.

I quiet often use HLs to display related records and at its extreme
they proved to be perfect for handling up to 100 related records
across  20 tables.  As a side note, I would only get the related
record if the user clicked on a table parent..

>Table 1
      John
      Dave
>Table 2
>Table 3

Meaning, I would only fetch Table2's records if the table was clicked.
Here is another tip for embedding meta data and create unique list
reference numbers to handle multiple tables...
$ListRef:= ($TableNum << 24) | $RecordNumber  (max table 256: Max
Records 16,777,215)
(Continue reading)

Justin Leavens | 1 May 2008 06:34
Picon

4D 2004 Backs up when logfile hits 2gb

So just ran into something I had never seen - a 4D 2004 customer was
suddenly backing up at 8:30pm instead of the scheduled 1am time. All
the setttings looked right, yet there was a backup at 8:30p one night,
8:45p the next.

It seems the log file was hitting 2gb in size (for reasons to be
explored). And when that happens, 4D Backup fires off, creating a new
archive and starting a new log. It was a problem because I had not
engineered for a backup during operational hours and the system was
locking up on open transactions.

Anyways, something I never seen before. Now off to figure out how I'm
doing 2gb in logfile when the database is only growing 10-20mb/day.
--

-- 
Justin Leavens, President
Just In Time Consulting, Inc.
justin@... / (818) 986-7298 phone / (818) 474-8580 fax
4D Consulting, AcctVantage/A4/Foresight Financials Specialist,
Certified Apple Consultant
www.justintimebusiness.com
**********************************************************************
An all-new List box. More features, more power.
Headers, footers, cell formatting and other goodies.
See it here first! http://www.4d.com/livedemos

4th Dimension Internet Users Group (4D iNUG)
FAQ:  http://www.4d.com/support/faqnug.html
Archive:  http://dir.gmane.org/gmane.comp.lang.inug-4d.tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
Post: mailto:4d_tech@...
(Continue reading)

psmith | 1 May 2008 08:05

Re: 4D 2004 Backs up when logfile hits 2gb

Justin,

Given 4D 2004's limit of 2gb per file, it's understandable. I'm actually
pleasantly surprised someone thought of including that feature, as
opposed to trashing the log file or crashing the server...

P. Smith

TSE International

> So just ran into something I had never seen - a 4D 2004 customer was
> suddenly backing up at 8:30pm instead of the scheduled 1am time. All
> the setttings looked right, yet there was a backup at 8:30p one night,
> 8:45p the next.
>
> It seems the log file was hitting 2gb in size (for reasons to be
> explored). And when that happens, 4D Backup fires off, creating a new
> archive and starting a new log. It was a problem because I had not
> engineered for a backup during operational hours and the system was
> locking up on open transactions.
>
> Anyways, something I never seen before. Now off to figure out how I'm
> doing 2gb in logfile when the database is only growing 10-20mb/day.
> -- 
> Justin Leavens, President
> Just In Time Consulting, Inc.

**********************************************************************
An all-new List box. More features, more power.
Headers, footers, cell formatting and other goodies.
(Continue reading)

Ian MacPherson | 1 May 2008 08:17

RE: HL lists - again

Chip,

You can use the bits of the high byte to indicate the table.
The Append to List in the Language ref has an example.
So you could use bit 25 to indicate the parent table, bit 26 to indicate the
child table etc.
Then when an item is selected check each of the high bits to find which
table.

Cheers,
Ian

> -----Original Message-----
> From: 4d_tech-bounces@... [mailto:4d_tech-bounces@...]
> On Behalf Of Chip Scheide
> Sent: Wednesday, April 30, 2008 10:42 PM
> To: 4D iNug Tech
> Subject: HL lists - again
> 
> Ok -
> Im getting this - I think  :)
> Ive created a multi level HL (displayed in an HL area) from records.
> 
> I can get the text of the selected item, regardless if it is leaf or a
> branch of the HL.
> 
> The only thing I am not sure of at the moment is:
> how to tell the difference between a user selected parent, child, etc
> i put a record number as the item reference value
> - BUT -
(Continue reading)

Ortwin Zillgen | 1 May 2008 10:14
Picon
Favicon

Re: HLs and efficiency

> what are the trade offs (speed memory etc) in C/S between building the
> entire HL before display vs "just in time" (ie as the use
> selects/exposes a parent list item)?

4D is fast, damn fast

building a flat list goes like this
SELECTION TO ARRAY()
  	`maybe concatenate textitems
ARRAY TO LIST()
hl:=Load List()

building a true hierarchical list uses recursiv calls working on arrays
for()
	buildSublist:=Current method
	APPEND TO LIST( ; ; ;buildSublist;True)
end for

by the way: having an record ID of type LongInt that is unique for the  
whole database pays twice at least
-	with HL
-	with EAN
using high bytes is nice, smart and unreadable.
Much easier and works for up to 2 mio records max:
ID:=(Sequence number *1000) + Table number

Regards
Ortwin Zillgen
___________________________________________________
Stadt Land Fluß * Geographic Informationsystems
(Continue reading)

Dietmar Harms | 1 May 2008 10:15

Re: HL lists - again

I would use some arrays in parallel with the HL. One array contains  
the item ref, others contain the information You need. The methods  
which adds/delete items could also maintain these arrays.

Best, Dietmar :-)

**********************************************************************
An all-new List box. More features, more power.
Headers, footers, cell formatting and other goodies.
See it here first! http://www.4d.com/livedemos

4th Dimension Internet Users Group (4D iNUG)
FAQ:  http://www.4d.com/support/faqnug.html
Archive:  http://dir.gmane.org/gmane.comp.lang.inug-4d.tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
Post: mailto:4d_tech@...
Options: https://lists.4d.com/mailman/listinfo/4d_tech
**********************************************************************


Gmane