Paul Ziegler | 25 Apr 02:09 2015
Picon

4D 13.4 and error -47,-48,-54

Re: Is there a hidden file .DSStore in the folder you are trying to delete.

Thanks Peter- I will check next week, but how would any other file get into the folder- I create it and add
files to it through 4D- via print command using pdf creator. I see how a file still existing in the folder
will cause an error -47 when trying to delete it, but what about error -54 and error -48?

I have been thinking that somehow these created files get put in a locked state and can't be deleted. But then
why would it work fine for most users.

Paul Ziegler
President
Private Advantage Software
Mt. Taylor Programs
www.privateadv.com
**********************************************************************
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@...
**********************************************************************

bob.miller | 25 Apr 00:07 2015

Re: Out of Memory problem

RE> a wild guess - did you try to allocate bigger stack to process? In my
experience, conversion routines often need memory of 3 - 4 times the size
of resulting data - space to pass data to and from method and conversion
buffer - it means that your 266kB blob may easily need 1MB on stack.

Hi Peter,

Good idea...I was calling New Process with 1024*512 for stack.  I changed 
it to 1024*1024, but same problem, on a new 4D startup I can run the 
method that calls Document to Blob, then Convert to Text - all is OK.  If 
I run it again without restarting 4D, I get an error Code -1 and GET LAST 
ERROR STACK returns error 300, xbox   Text Conversion failed.

Sad <

Bob Miller
Chomerics, a division of Parker Hannifin Corporation

**********************************************************************
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@...
**********************************************************************

Robert McKeever | 24 Apr 23:39 2015
Picon

Progress bar

4D V13

Trying to setup a progress bar in a separate process.

Could not get the barber pole to animate.

The async beach ball worked fine (open window, modify record where the form just has the async beach ball on
it), but it disabled interaction with the original process (I had a request dialog up, and I could not enter
anything or click.

Looked for examples on the 4D site - found nothing.

Looked here for any email containing the word barber. One, where it required making 16 images with
Photoshop, etc. Nothing on how to get a good progress indicator.

Ideas? Sample code?

_________________________________________
Bob McKeever                      http://www.mswl.com
McKeever's Software Wizardry
Maple Ridge, B.C.
bobmckeever@...

**********************************************************************
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
(Continue reading)

Paul Ziegler | 24 Apr 23:34 2015
Picon

4D 13.4 and error -47,-48,-54

We are using 4D 13.4 mostly Stand Alone apps. I posted a question about
this on the NUG about 1 year ago.

Problem: Users get error message -47,-48 and -54 when sending batch emails
with an attached pdf. I have a loop that first tests for existence of a
temporary folder that I create in the same folder as the database ( tried
other locations too) if doesn't exists it is created. Then I create a pdf
procedurally and save it to the temporary folder. I attach it to an email
sent with 4D commands. After it is sent I delete it and repeat loop for
next records selected. Usually the problem users get the error message on
the second email but some on the first.

What I have tired: unreproducible on our computers. Happens every time with
the users who are having problems. It only happens with a small percentage
of our users and others never experience them. Doesn't seem to matter what
OS they are running. Most of the problem users are on Windows ( XP,Win 7
and Win 8.x but at least one is on Mac.

I placed alerts in one users compiled app that pointed to the error
occurring with the Create Folder or Delete Document command. Since this
only occurs on a few users computers and is not reproducible on our
computers ( and most of our installed base) I thought it was a permissions
issue. Several different users had IT who firmly state that there are no
restrictions on the users level and even try it at the Admin level without
success. Virus apps don't seem to be the problem. I put a delay before the
Delete Document command to see if it was a timing issue without success.
Logic points to some permission settings on the users computer that cause
the problem but very experienced IT staff at the sites say everything looks
fine.

(Continue reading)

Jeffrey Kain | 24 Apr 20:41 2015
Picon

4DIC Msg_GetBody and Content-Transfer-Encoding

It would appear that Msg_GetBody doesn’t look at the Content-Transfer-Encoding method and just
downloads whatever is there in plain text.

Does this sort of match what others have found?

For some reason, a Hotmail server (<insert hotmail/MS jokes here>) sometimes sends everything encoded in
base-64. The email I’m looking at is a multipart message, the first part is text/plain but base-64
encoded, the 2nd part is text/html and also base-64 encoded.

Has anyone handled this with just the high-level msg_ commands or do I have to start pulling apart the email
part by part?**********************************************************************
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@...
**********************************************************************

bob.miller | 24 Apr 20:02 2015

Out of Memory problem

Peter,

This isn't quite the same as what you are experiencing, but I've noted the 
following results:

> If Blob size is 116,400 kb - using Convert to Text will work just fine.

> If Blob size is 266,350kb - using Convert to Text returns nothing BUT 
the OK variable is set to 1.

I do have an error handler installed, and this is the interesting part: 
the error is -1 ("Unknown entry point requested by a plugin")...I would 
think there's some issue with Blob handling that is not correctly using 
memory in 4D - I'm showing plenty of cache (see below).

This is what memory looks like immediately before calling Convert to Text:

Base Stack Size:        1,048,576
cacheSize       2,104,164,352
usedCacheSize   1,581,322,624
Physical Memory Size    17,131,884,544
Free Memory     10,473,267,200
Used physical memory    2,353,532,928
Used virtual memory     3,767,205,888
Used Mem        1,581,322,624
Free Mem        522,841,472
Nb Big Blocks   38,059
Nb Used Big Blocks      37,673
Nb Free Big Blocks      386
Nb Pages containing small blocks        35,764
(Continue reading)

Chip Scheide | 24 Apr 20:01 2015

v12 - compiler error - I do not understand...

I am getting the following error:
Error code: -20002 Accessing a parameter that does not exist.

here is the method where the error is thrown:
  //(m) menu_Containers

  //RETURNS - longint - New process ID
  // ∙ Created 1/18/13 by Chip - 
C_LONGINT($0)

$0:=utl_process_New_Process ("contan_Edit_Containers";"Containers")
  //End menu_Containers

utl_process_New_Process - can take as few as 1 and an many parameters 
as needed to pass along to called new process/method

**********************************************************************
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@...
**********************************************************************

bob.miller | 24 Apr 16:57 2015

Query by Formula - using Editor

Hi Everyone,

I'm starting to play with using Query by Formula as it is widely purported 
to be much faster than in "legacy" 4D - and wow, it rocks!  I'm astonished 
at how speedy it is.

I'm flummoxed by one thing, however; when I want to use the QBF editor 
window with a 4D expression that requires a variable name, it just won't 
work for me.  Specifically, I was searching for a given character code 
using this expression:

Position(Char(318);[MyFile]Description;vCount;*)>0

In order to have the Position function evaluate using a character code, I 
need the 4th parameter, but this means I have to put something in for the 
3rd parameter, which according to the docs must be a longint variable (it 
gets the length of the string that is found).  In this case, I chose a 
variable declared as LONGINT immediately before the call to Query by 
Formula, but the formula editor doesn't seem to like it. 

I do note that this syntax does not give a syntax error, but it also does 
not return the correct results:

Position(Char(318);[MyFile]Description;"";*)>0

...in this case, an empty string passed as $3 is somehow syntactically OK 
with the formula editor window, but the search finds nothing, when if I 
execute a QBF using a variable as $3 in code, I get some hits.

Am I doing something wrong as I try to use Position with Query by Formula 
(Continue reading)

Peter Mew | 24 Apr 13:06 2015
Picon

Out of Memory problem

Hi
I have a stand alone app 4D 13.5 Windows 7, that stores a large (up to
700MB) audio file in a blob field in the database, DOCUMENT TO BLOB.
When the user wants to use this file, the data is written to disc using
BLOB TO DOCUMENT.
This works on most machines, but there a couple of machines, that if the
file exceeds about 500MB I get an error -108 out of memory.
I have checked the free memory before the Document to Blob command is
executed and its usually between 1.5 and 2 gig free.
All the machines are running windows 7 except 1 running vista all have 4
gig ram installed, when this happens there are no other apps running.
There is never more than 1 record in the database at any time
the app itself uses about 200MB.
any ideas why this should be happening
Thanks for any ideas or things to try

-pm
**********************************************************************
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@...
**********************************************************************

Florian Pöck | 24 Apr 10:19 2015
Picon

Cleaning up old 4d-projects

Hi,

i am still working cleaning up a 4D-based (currently v13) project which has a  >20 year history.
Wide parts of the code are pretty messy and i am wondering what general cleaning-mechanism other 4d
developers might use.

I do know that 4D offers the option to search
- unused methods and global variables
- unused local variables
Which i already used both to locate several no longer used parts.
In addition i am using the Code Analysis component - which is helpful as well on multiple aspects.

But the code also comes with code snippets like i.e. empty or completly outcommented if/else blocks which
are useless (why i would love to remove them) - but hard to locate.

Please let me know your tricks to clean up projects you took over from other developers.

Thanks in advance
Florian

--

-- 
 - Stromversorgungen für industrielle Anwendungen -
 - Power supplies for industrial applications -

    Kniel System-Electronic GmbH
        Postfach/Postbox 210849 - 76158  Karlsruhe - Deutschland/Germany
        Telefon/Phone +49 721 95920 - Fax +49 721 9592100
        www.kniel.de
        -
        Geschäftsführer/Managers:
(Continue reading)

Sujit Shah | 24 Apr 06:43 2015
Picon

Command to Set Value of a Filter

Is there a command I can use to assign the value of a Filter:

SET FILTER("FilterName";aStringValue)

This will save me a lot of time..

??

--

-- 

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"There must be ingenuity as well as intention, strategy as well as
strength. "
**********************************************************************
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@...
**********************************************************************


Gmane