Pat Bensky | 18 Apr 23:08 2014
Picon

On Drag Over event on list box

I've selected the On Drag Over event for a listbox. On the object I have:

$evt:=Form event
Case of
: ($evt=On Drag Over)
DRAG AND DROP PROPERTIES($vpSrcObj;$vlSrcElem;$vlPID)
If ($vpSrcObj=$1)
$0:=0
Else
$0:=-1
End if
End Case

What happens is that as soon as I try to drag a row within the listbox, 4D
freezes and I have to force quit.

​It's a selection-based listbox.

Do I need to do something else to make this work?

--

-- 
*************************************************
CatBase - The Database Publishing Solution
tel: +44 (0) 1462 454522
w: http://www.catbase.com
skype: pat.bensky
*************************************************
**********************************************************************
See how easy it is to extend your 4D solutions to Web and mobile. New opportunities await you with 4D v14!

(Continue reading)

Ronnie Teo | 18 Apr 18:21 2014

Date Format in OS X Mavericks

Hi, I sent a query regarding date formats in Mavericks.  Did a bit more research into it and found that I’m
actually not alone in this.  Apparently, it’s a Mac issue, specifically Mavericks issue.  

I quote “ … ..I’m having a similar problem since moving up to Mavericks. In Australia we use the
dd/mm/yyyy format, which is set up correctly under the Language and Region settings, but now a lot of the
programs including Excel and MYOB are defaulting to the US format, ie. mm/dd/yyyy, which is quite
annoying. Those programs seem to get their format from the OS, so I'm guessing it's not delivering them the
same way any more…”

To that list of problematic apps, I now add 4D.  My question now should be are there any non-US users who have
faced this problem and discovered a fix…. or should we just sit tight and wait for a fix from Apple?

Hi, I just upgraded my system to an iMac running OSX Mavericks….as a result, I need to ask a somewhat easy
question that had me stumped.

The change seemed to have wrecked havoc on the date formats in my database applications. 
Although in System Preferences, the date format has been set to DD/MM/YYYY, in 4D it is still stored and
displayed as MM/DD/YYYY.

On my prior systems up to OS X Snow Leopard, this same setting has always worked with no problems.  
These applications have been in use for some time, with no issues on dates.
Now a query for !12/02/2011! for instance gives me a result for all records with the date Dec 2nd instead of
Feb 12th.

How do I my 4Dv11 database to recognise the correct date format in DD/MM/YYYY ?**********************************************************************
See how easy it is to extend your 4D solutions to Web and mobile. New opportunities await you with 4D v14!

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
(Continue reading)

Tim Nevels | 18 Apr 01:01 2014
Picon

Re: Calculating overall data file fragmentation...

On Apr 17, 2014, at 3:50 PM, JPR wrote:

> The Data Fragmentation has almost always been a concern for 4D Developers. I perfectly remember the
experiences I've shown during trainings, but it was with 4D V6.5 and 2004. I made DataAnalyzer in 1996,
just to verify the impact of data fragmentation on response time. Things have changed a lot since.

I remember DataAnalyzer. That was the most amazing pure 4D application that I had ever seen at that time. 

Using only 4D code -- no special plugins needed -- it would open a 4D data file and read it byte by byte and
analyze it. Then show the layout of the indexes and records in the data file in graphs and pictures. Record
sizes, index sizes, fragmentation, etc. The pictures -- in Mac OS PICT format -- were built pixel by pixel
with pure 4D code. JPR showed the awesome power of the BLOB TO PICTURE  command. 

I had not thought about DataAnalyzer in a long time.  Great tool JPR!

> The techniques I've given during V6.5 trainings (like 'Stable data' technique) are more or less obsolete
on V14. You can't apply steam engine techniques on turbine optimization…

Well put, well put. Another JPRism worth repeating. :)

Are you going to do another session -- or at least thinking about doing another session -- at this year's 4D
Summit in Texas? 

Tim

********************************************
Tim Nevels
Innovative Solutions
785-749-3444
timnevels@...
(Continue reading)

Tim Nevels | 18 Apr 01:01 2014
Picon

Re: Remedial question: Custom icons for a stand-alone app on OS X

On Apr 17, 2014, at 3:50 PM, Koen Van Hooreweghe wrote:

> Sujit,
> 
> I don't have it in my BuildApp.xml file. This is v12/v13
> 
> Design Ref (http://doc.4d.com/4Dv13.4/help/Title/en/page1270.html):

> 
> When building a double-clickable application, 4D handles the customizing of the icon.
> 
> In order to do this, you must create an icon file (icns type), prior to building the application file, and
place it next to the interpreted structure file.
> 
> Note: Apple, Inc. provides a specific tool for building icns icon files.
> 
> Your icon file must have the same name as the interpreted structure file and include the .icns extension.
> 
> 4D automatically takes this file into account when building the double-clickable application (the
.icns file is renamed ApplicationName.icns and copied into the Resources folder; the CFBundleFileIcon
entry of the “info.plist” file is updated).
> 
> -------------------------
> 
> If I understand this correctly (and that is what I do), the .icns file must be next to your .4DB file. Which is
inside the .4dbase package!

Both ways work. You can do the same name and proper location -- I call this the "automatic" way. 

You can also add keys to the BuildApp.xml file. If you are building a server and client app -- and you are
(Continue reading)

Ronnie Teo | 17 Apr 13:11 2014

Date format in OS X Mavericks

Hi, I just upgraded my system to an iMac running OSX Mavericks….as a result, I need to ask a somewhat easy
question that had me stumped.

The change seemed to have wrecked havoc on the date formats in my database applications. 
Although in System Preferences, the date format has been set to DD/MM/YYYY, in 4D it is still stored and
displayed as MM/DD/YYYY.

On my prior systems up to OS X Snow Leopard, this same setting has always worked with no problems.  
These applications have been in use for some time, with no issues on dates.
Now a query for !12/02/2011! for instance gives me a result for all records with the date Dec 2nd instead of
Feb 12th.

How do I my 4Dv11 database to recognise the correct date format in DD/MM/YYYY ?

Thanks,
Ronnie**********************************************************************
See how easy it is to extend your 4D solutions to Web and mobile. New opportunities await you with 4D v14!

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

JPR | 17 Apr 11:37 2014
Picon

Re: Calculating overall data file fragmentation...

[JPR]

Hi Jörg,

The Data Fragmentation has almost always been a concern for 4D Developers. I perfectly remember the
experiences I've shown during trainings, but it was with 4D V6.5 and 2004. I made DataAnalyzer in 1996,
just to verify the impact of data fragmentation on response time. Things have changed a lot since.

Now, there are many kind of blocks inside a data file: 
- Objects that you use and load: Records, LSO (Large Size Objects: Blobs, pictures, large texts, JSON)
- Objects that 4D uses (Address tables, block-allocation tables, etc.)

There are also many kind of fragmentation. From all these kinds, the only important ones are the ones that
will oblige the disk head to move frequently. In fact, a disk reads a buffer whose size depends on the
manufacturer. When 4D loads one record, the disk loads a buffer, from the record beginning, and as big as
the buffer size. If records are following each other in the proper order (i.e. order in the address table,
for instance 1 2 3 4 5...), many subsequent records will be loaded. But if the records are in the reverse
order (5 4 3 1 2) it will oblige the system to ask the disk to realod the full buffer everytimes. This is why a
negative fragmentation is very important, but a small positive fragmentation is not (for instance some
empty blocks between consecutive records)

Also, fragmentation matters only in some cases always involving sequential access (Sequential query,
Selection to array, etc.), and only if this access is done in the default order (i.e. order of records
inside the address table). Otherwise, the access is always random access where the fragmentation effect
if much less important.

I think that there are the questions you must ask yourself before being concerned by fragmentation:

- Do I access data sequentially ? And, if yes, is it in the default order ? If not, you don't care about fragmentation.

(Continue reading)

stardata.info | 17 Apr 09:08 2014

Re: RECORD NUMBER

Thanks Douglas,

/Ferdinando/

Il 16/04/2014 20.49, 4d_tech-request@... ha scritto:
> Message: 3
> Subject: Re: RECORD NUMBER
> Date: Wed, 16 Apr 2014 10:07:52 -0700
> From: Douglas von Roeder<dvonroeder@...>
> To: 4D iNug Technical<4d_tech@...>
> Message-ID:
> 	<CAPR+Oi96Fs9b3888XFKFmOQyis_XYraM8DXGCx-P8wNeh0vtnw@...>
>
> Record number is zero-based so 0 is a valid value for the first record in a
> table.
>
> --
> Douglas von Roeder
> 949-336-2902

**********************************************************************
See how easy it is to extend your 4D solutions to Web and mobile. New opportunities await you with 4D v14!

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

(Continue reading)

David Adams | 17 Apr 04:52 2014
Picon

Remedial question: Custom icons for a stand-alone app on OS X

I've done it before...I've hunted the docs...I'm stumped.

How do you get BUILD APPLICATION to include a custom .icns file during the
build? I've tried out the most likely looking keys without success.

If anyone remembers off the top of their head, I'd be grateful for the
answer.
**********************************************************************
See how easy it is to extend your 4D solutions to Web and mobile. New opportunities await you with 4D v14!

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

Phillip Hall | 17 Apr 03:40 2014
Picon

4Dv14 + $4d object in Web Area

Hi,

I am working on a project where we would like to use the Web Area to evaluate some arbitrary Javascript and
return a result to 4D.

One requirement is that the Javascript must be able to call back to 4D to retrieve data, do its calculations
and then return the result.

We would like to be able to evaluate something like the following Javascript method.

function calculateSomeValue () {
                var dataFrom4D = $4d.FourDMethod();
                var moreDataFrom4D = $4d.Another4DMethod(datafrom4D);

                return dataFrom4D + moreDataFrom4D;
}

The problem is that the call to $4d.method is asynchronous and the result is return in a call back method. 
This causes the synchronous execution chain to break.

Does anyone know of a way to use a $4d.method call synchronously?

Thanks
Phillip

Phillip Hall

4D Developer

P: +61 2 8273 7500 | F: +61 2 9247 7544
(Continue reading)

David Adams | 17 Apr 03:07 2014
Picon

Calculating overall data file fragmentation...

The Get table fragmentation is handy for checking the data file but now I'm
hoping to find something comparable to MSC's overall data file
fragmentation result. Checking individual tables, I can find items that
have 100% fragmentation. But is that because 10 records were cleared?
10,000? 1,000,000? There's really no way to know. If a tiny tables has been
cleared, the % of fragmentation in the total data file may still be low -
but the table can show a very high fragmentation percentage.

Any suggestions on how to come up with a smarter guess?

Thanks.
**********************************************************************
See how easy it is to extend your 4D solutions to Web and mobile. New opportunities await you with 4D v14!

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

stardata.info | 16 Apr 19:01 2014

RECORD NUMBER

Hi All,

In one record creation, after the SAVE RECORD command i have a RECORD 
NUMBER equal to zero.
You know the reason?

Thanks
/Ferdinando/


Il 16/04/2014 15.56, 4d_tech-request@... ha scritto:
> Send 4D_Tech mailing list submissions to
> 	4d_tech@...
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.4d.com/mailman/listinfo/4d_tech
> or, via email, send a message with subject or body 'help' to
> 	4d_tech-request@...
>
> You can reach the person managing the list at
> 	4d_tech-owner@...
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of 4D_Tech digest..."
>
>
> Today's Topics:
>
>     1. Strange behaviour when moving Listbox column (Piotr)
>     2. Re: Can't save a new record (Richard Wright)
(Continue reading)


Gmane