View RSS Feed

Development Team Blog

  1. Transferring large strings with web services

    by , 26-May-2010 at 08:00 AM (Development Team Blog)
    The other day I received an interesting question from a developer about [I]argument_size[/I] and web services. Specifically he wanted to create a web service in VDF that accepts a file attachment along with some other metadata for the file. It would look something like this (actual code modified for brevity):

    [code]
    Struct tAttachment
    String fileName
    String comment
    ...
    String fileContent
    End_Struct

    ...
    ...
    Tags: sonny falk
    Categories
    Uncategorized
  2. The other side of External_Function

    by , 18-May-2010 at 08:00 AM (Development Team Blog)
    We're continuing the back to the basics theme for advanced VDF developers by visiting the other side of [I]External_Function[/I]. If you haven't done so already, you should [URL="http://support.dataaccess.com/forums/blog.php?b=84"]read the first part[/URL], it's a prerequisite for understanding what I'm about to talk about here.

    Let's start with a simple DLL written in C++, exporting only one silly function [I]SayHello()[/I], which we'll call from our VDF program. The finished ...
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	hello-project.png 
Views:	1544 
Size:	20.1 KB 
ID:	3809   Click image for larger version. 

Name:	hello-project2.png 
Views:	1438 
Size:	24.0 KB 
ID:	3810   Click image for larger version. 

Name:	hello-project3.png 
Views:	1413 
Size:	12.2 KB 
ID:	3811   Click image for larger version. 

Name:	hello-project4.png 
Views:	1409 
Size:	31.9 KB 
ID:	3812   Click image for larger version. 

Name:	hello-project5.png 
Views:	1432 
Size:	25.2 KB 
ID:	3813   Click image for larger version. 

Name:	hello-project6.png 
Views:	1440 
Size:	1.6 KB 
ID:	3814  
    Attached Thumbnails Attached Files
  3. Numeric masks and rounding, floating point values and conversions

    by , 3-May-2010 at 08:00 AM (Development Team Blog)
    Frank is [URL="http://support.dataaccess.com/forums/showthread.php?t=42637"]asking about a peculiar behavior with numeric masks and rounding[/URL], where it seemingly sometimes rounds the value to the specified number of decimals in the mask, but other times it seems to truncate instead. What's going on? Is this a bug?

    Frank demonstrated the problem in an excellent manner using a tiny program like this:
    [code]
    Use DfAllEnt

    Object oMain is a Panel ...
  4. How does External_Function really work?

    by , 22-Apr-2010 at 08:00 AM (Development Team Blog)
    Let's take a closer look at [I]External_Function[/I]. But first, there are currently two generic and well established technologies you can use from VDF to interact with external components, DLL functions and COM objects. Actually, there are several other techniques available as well, the obsolete and defunct DDE technology, and the more modern SOAP technology for example, and various other IPC mechanisms. But we'll ignore those for now.

    DLL and COM are the two fundamental technologies ...
  5. Converting a String to Char[]

    by , 14-Apr-2010 at 08:00 AM (Development Team Blog)
    In [URL="http://support.dataaccess.com/forums/blog.php?b=83"]the last article[/URL] I mentioned that the [I]Address[/I] type can be used to efficiently copy a [I]Char[][/I] containing a null terminated C string to a VDF [I]String[/I], and I also mentioned that it works the other way around. A follow-up question I received (and should have predicted) was about exactly how you can do that.

    Basically, the task is to quickly and efficiently copy a VDF [I]String[/I] to a [I]Char[][/I]. ...
    Tags: sonny falk
    Categories
    Uncategorized
  6. Address and Pointer, what's up with that?

    by , 1-Apr-2010 at 08:00 AM (Development Team Blog)
    If you've been a VDF developer for a while you've undoubtedly come across [I]Pointer[/I], but what about the [I]Address[/I] type? Isn't that just redundant?

    [I]Pointer[/I] has been around seemingly forever, but you may or may not know that [I]Pointer[/I] is not a real data type in its own right. If you type [I]Pointer[/I] in the Visual DataFlex Studio editor and hover your mouse cursor over the word, you'll see a tooltip that says "Alias type Pointer Integer". So even though ...
  7. Diagnosing Studio and compile time performance problems

    by , 22-Mar-2010 at 08:00 AM (Development Team Blog)
    When it comes to performance working in the Studio as a developer, as opposed to running the application, there are generally two performance critical areas. The first one is the Studio Parser, which is the foundation for CodeSense, Visual Modeling, Go-To-Definition and more. The second performance critical area is when compiling. Unnecessarily long and slow compile times can make for a very frustrating experience working with the Visual DataFlex Studio.

    Sometimes you may not even ...

    Updated 17-Mar-2010 at 05:25 PM by Sonny Falk

    Categories
    Uncategorized
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	comp-perf.jpg 
Views:	1036 
Size:	26.8 KB 
ID:	3799   Click image for larger version. 

Name:	parse-perf.jpg 
Views:	1006 
Size:	29.0 KB 
ID:	3800   Click image for larger version. 

Name:	studio-load.jpg 
Views:	1014 
Size:	29.8 KB 
ID:	3801   Click image for larger version. 

Name:	studio-parse.jpg 
Views:	1063 
Size:	51.5 KB 
ID:	3802   Click image for larger version. 

Name:	bigws2.jpg 
Views:	998 
Size:	50.7 KB 
ID:	3803   Click image for larger version. 

Name:	bigws1.jpg 
Views:	1062 
Size:	23.6 KB 
ID:	3804  
  8. AddressOf() does/did not work as expected with String[]

    by , 15-Mar-2010 at 09:00 AM (Development Team Blog)
    A while ago I received a question about why the following code is not working as expected:

    [code]
    String[] listData
    ...
    Move (SendMessage(hWnd, LB_ADDSTRING, 0, AddressOf(listData[iIndex]))) to iRetval
    [/code]

    It's a little tricky, but the code is expecting a pointer to a null terminated C-style string. And usually [I]AddressOf()[/I] will produce that with a local string variable. But in this case [I]AddressOf()[/I] actually returns a pointer ...
  9. The secret NewRecord command

    by , 8-Feb-2010 at 09:00 AM (Development Team Blog)
    A well known old trick in DataFlex is the [I]Move 0 to Recnum[/I] trick. It's been used with character mode DataFlex and Visual DataFlex for so long that nobody probably remembers where it came from, and I'm not sure it was ever really a documented or intended feature in the beginning. Nonetheless it became a fully supported technique at some point.

    Basically, if you ever wanted to create a new record loosely based on data from an existing record, you could use this trick to simplify ...
    Categories
    Uncategorized
  10. Sometimes it's better to Just do it: Examples

    by , 1-Feb-2010 at 09:00 AM (Development Team Blog)
    As soon as the [URL="http://support.dataaccess.com/forums/blog.php?b=74"]previous article[/URL] was published, I realized that some examples would go a long way to illustrate the point. Of course, I wrote it a week ahead, but didn't think of adding examples until the same day it was published... Oh well, we've all been there... So here are some real-world examples of what I was talking about.

    [B]Start Center[/B]
    A few years ago when the Start Center in the Studio ...

    Updated 1-Feb-2010 at 08:05 PM by Sonny Falk

    Categories
    Uncategorized
  11. Sometimes it's better to Just do it

    by , 27-Jan-2010 at 09:00 AM (Development Team Blog)
    I very often see questions like "How can I find out if doing xyz will work?". Often that's in disguise for a more straightforward problem like "Sometimes when I do xyz I get an error, I just want to suppress the error and do something else instead."

    That original problem should lead you to think: "I know, I'll check for the error and handle it". But all too often it turns into "I'll figure out if doing xyz is going to succeed first, and then I do ...
  12. A procedure that does not return a value, does not return a value

    by , 22-Jan-2010 at 07:00 AM (Development Team Blog)
    Most procedures do not return a value, so don't be surprised when you get no return value from a web service method that's a procedure. This may sound obvious, but it can be confusing when you get an unexpected message that seems to suggest something's wrong.

    A bug report actually made it all the way to our bugtracker system, actually suggesting we should disable use of [I]Procedure[/I] for web service methods. This suggestion was based on a logical but mistaken conclusion formed ...
  13. What does Argument_Size really do?

    by , 18-Jan-2010 at 09:00 AM (Development Team Blog)
    The basic effect of [I]Set_Argument_Size[/I] is that it limits the maximum size of strings that can be manipulated. [URL="http://support.dataaccess.com/forums/blog.php?b=61#comment136"]Mark wonders if it specifies a fixed string variable size[/URL]. A simplified explanation would be that it limits the upper size of String variables, but String variables do not have a fixed size.

    A clue to the low level technical explanation is in the name Argument_Size. It doesn't actually ...
  14. Why does if/else statements behave so strangely when debugging?

    by , 11-Jan-2010 at 09:00 AM (Development Team Blog)
    In most cases you don't even realize it, but if you look closely enough when stepping through i[I]f/else[/I] statements in the debugger, you notice it seems to behave in an unintuitive manner, even though it actually works correctly.

    [code]
    If (1=1) Begin
    Showln "yup"
    End
    Else If (1=1) Begin
    Showln "huh?"
    End
    Else If (1=1) Begin
    Showln "what?"
    End
    [/code]

    ...
  15. Practical XML namespaces

    by , 22-Dec-2009 at 08:00 AM (Development Team Blog)
    Now that you've read the new namespace primer in the Visual DataFlex documentation, and perhaps also read [URL="http://support.dataaccess.com/forums/blog.php?b=67"]John's article about namespaces[/URL] (you have read them, right?), you're probably thinking, good, but how do I really use namespaces when creating my XML document?

    First, you should use [I]AddElementNS[/I] and so on, all those methods ending with [I]NS[/I]. As John mentioned, you'll notice that you specify the ...
  16. On the same (code) page

    by , 17-Dec-2009 at 11:00 AM (Development Team Blog)
    International characters have always been very complicated to deal with in computer systems, and configuring your computer for your locale is often more difficult than it should be. Have you ever had the problem where extended ascii characters such as [IMG]http://support.dataaccess.com/forums/blog_attachment.php?attachmentid=59&stc=1&d=1260836739[/IMG] ends up being displayed in a dbForm or similar in your VDF application as [IMG]http://support.dataaccess.com/forums/blog_attachment.php?attachmentid=60&stc=1&d=1260836885[/IMG] ...

    Updated 24-Mar-2011 at 01:03 PM by Marcia Booth

    Categories
    Uncategorized
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	us-good.jpg 
Views:	1395 
Size:	43.0 KB 
ID:	3779   Click image for larger version. 

Name:	swe-bad.jpg 
Views:	1506 
Size:	42.3 KB 
ID:	3780   Click image for larger version. 

Name:	conflict.jpg 
Views:	1367 
Size:	37.9 KB 
ID:	3781   Click image for larger version. 

Name:	settings-xp.jpg 
Views:	1448 
Size:	93.2 KB 
ID:	3782   Click image for larger version. 

Name:	settings-vista.jpg 
Views:	1527 
Size:	104.1 KB 
ID:	3783   Click image for larger version. 

Name:	swe-good.jpg 
Views:	1390 
Size:	49.5 KB 
ID:	3784  
    Attached Thumbnails Attached Images     
    Attached Thumbnails Attached Files
  17. Introducton to XML Schemas

    by , 8-Dec-2009 at 09:00 AM (Development Team Blog)
    New to Visual DataFlex 15.1 is XML Schema support, which is cool, but what if you don't know the first thing about XML Schemas?

    Your first exposure to XML Schemas will most likely be a schema created by someone else. Perhaps you're expected to produce XML documents conforming to the specified schema. If you're lucky you will have been given an example of the document you're supposed to produce from your program, and maybe you can cheat a little and follow that instead of understanding ...

    Updated 9-Dec-2009 at 01:48 AM by Sonny Falk

    Categories
    Uncategorized
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	schema-header.png 
Views:	988 
Size:	5.5 KB 
ID:	3787   Click image for larger version. 

Name:	schema-collapsed.png 
Views:	1006 
Size:	7.6 KB 
ID:	3788   Click image for larger version. 

Name:	schema-simpleType.png 
Views:	992 
Size:	9.1 KB 
ID:	3789   Click image for larger version. 

Name:	schema-complexType.png 
Views:	1040 
Size:	14.2 KB 
ID:	3790   Click image for larger version. 

Name:	schema-element.png 
Views:	1080 
Size:	17.9 KB 
ID:	3791  
    Attached Thumbnails Attached Files
  18. What's a crash, anyway?

    by , 1-Dec-2009 at 02:02 PM (Development Team Blog)
    A program crashing is something we're all painfully familiar with, but what does it really mean? [I]Crash[/I] can mean different things to different people, sometimes people even use the term [I]crash[/I] when referring to different types of problems at different times. It's often used loosely to mean anything from "the operating system rudely terminated my program", or simply "an error message was displayed (fatal or non-fatal)", or "the program stopped responding to user ...
    Tags: sonny falk
    Categories
    Uncategorized
  19. RunProgram: Possibly the most misunderstood command ever

    by , 5-Nov-2009 at 09:00 AM (Development Team Blog)
    This poor command has been around in Visual DataFlex for as long as anyone can probably remember. Every VDF developer knows about this command, yet it's so often misunderstood and a frequent subject in the forum. It's actually pretty well documented, the documentation was even improved a few revisions back when the command was also enhanced for smoother operation in Vista. But probably because it's so well known, you rarely consult the documentation. So I'll provide a quick primer for this command, ...
    Categories
    Uncategorized
  20. Visual DataFlex 15.1 Sneak Peek - XML Changes

    by , 19-Oct-2009 at 08:00 AM (Development Team Blog)
    By the time this gets published, Visual DataFlex 15.1 is just about to enter Beta testing. One of the cool new things is that XML support has been updated. The changes include an internal update of the underlying MS XML standard Windows library to msxml6. And perhaps the most requested new feature is support for XML Schema validations.

    These changes to the XML classes can be taken advantage of immediately as you update to VDF 15.1. From a code perspective you still use the same classes ...
    Categories
    Uncategorized
Page 1 of 2 12 LastLast