Alpha Software Message Board  

Go Back   Alpha Software Message Board > Alpha Five Desktop Applications > Alpha Five Version 9 - Desktop Applications
Register FAQ Members List Calendar Mark Forums Read

Reply
 
Thread Tools
Old 07-19-2008, 01:44 PM   #1
reynolditpi
Member
 
Join Date: Sep 2006
Posts: 378
Default Variable Type "H"

I have tried to use the action script to create a new record using xbasic to add a record which contains a html memo field.

A5 dimmed the variable type for the html field as "H" which i am assuming means html. Regardless, when the script is run alpha does not recognize "H" as a valid variable type.

Since A5 dimmed the variable itself should it not then recognize it?
reynolditpi is offline   Reply With Quote
Old 07-19-2008, 05:32 PM   #2
Davidk
Member
 
Join Date: Apr 2008
Location: Markham, ON
Posts: 681
Default Re: Variable Type "H"

I've had a look through help and can't see a variable data type "H"
Davidk is offline   Reply With Quote
Old 07-19-2008, 09:10 PM   #3
reynolditpi
Member
 
Join Date: Sep 2006
Posts: 378
Default Re: Variable Type "H"

David,
I couldnt find it either. However, A5 still dimmed it as "H" in my action script
reynolditpi is offline   Reply With Quote
Old 07-20-2008, 12:24 AM   #4
Davidk
Member
 
Join Date: Apr 2008
Location: Markham, ON
Posts: 681
Default Re: Variable Type "H"

I added a button to form, which executed a script via xbasic. The script added a new record, setting an HTML Memo field to the value "Test". The script ran fine.

I converted the script to in-line xbasic... here's the code... is this what you're referring to? It's not dimming the field as "H".

'Open the table that you want to update...
dim tbl as p
tbl = table.open("tblclaims",FILE_RW_SHARED)

tbl.enter_begin()
tbl.HTMLTEST = "Test"
tbl.enter_end(.t.)
tbl.close()
Davidk is offline   Reply With Quote
Old 07-20-2008, 02:39 AM   #5
MikeC
"Certified" Alphaholic
 
Join Date: Nov 2005
Location: Wisconsin
Posts: 5,247
Default Re: Variable Type "H"

Tony,
Could just be an anomaly, quirk, whathaveyou.....earlier today I noticed after messing with a couple of calculated definitions, they showed up in the xy dialog box's bottom left side of the status bar as a type Z (zee). And I know this is not a variable type. Once I got the calculation to work as I wanted and leaving Alpha and coming back, it shows as N as it should.
__________________
Mike
__________________________________________
It is only when we forget all our learning that we begin to know.
It's not what you look at that matters, it's what you see.
Henry David Thoreau
__________________________________________
Weekly QReportBuilder Webinars


MikeC is offline   Reply With Quote
Old 07-20-2008, 09:05 AM   #6
csda1
VAR
 
csda1's Avatar
 
Join Date: Apr 2000
Location: Boston, Massachusetts, USA
Posts: 3,181
Default Re: Variable Type "H"

Hi Tony,

I can't speak to the cause of an action script DIM'ing as H (It would be useful if you could show the action or post some code here), however, I have compiled a list of various types that help highlight some of this. I suspect there is a minor bug with the action script. Type "H" was added to the Memo field types in A5v9.

The types are basically defined as

' Types actually stored in a DBF Table Structure
' C=Character
' N=numeric
' L=Logical (width 1)
' D=Date (width 8)
' T=Time (width 17)
' Y=Short Time (width 9)
' E=ExponentNumeric (width 20)
' K=UUID (width 32) A5v9
' M=Memo (width 10)
' M=Bitmap Memo (width 10)
' M=OLE Memo (width 10)
' M=Rich Text Field Memo (width 10)
' M=JPEG image Memo (width 10)
' M=Image File Reference Memo (width 10)
' M=HTML Memo (width 10) A5v9

' Variable types allowed in XBasic Code
' A=Any Type
' B=Blob
' C=Character
' D=Date
' F=Function
' L=Logical
' N=numeric
' P=Pointer
' T=Time
' U=Collection
' Y=Short Time
' Z=Undefined (Null) Type
' K=UUID (A5v9)
' I=I Type (This type is unknown in it's usage)

' non-Memo field types (Data types as stored in the Data Dictionaries)
' C=Character
' N=numeric
' L=Logical (width 1)
' D=Date (width 8)
' T=Time (width 17)
' Y=Short Time (width 9)
' E=ExponentNumeric (width 20)
' K=UUID (width 32) A5v9
' Memo field types (Data types as stored in the Data Dictionaries)
' M=Memo (width 10)
' B=Bitmap image Memo (width 10)
' O=OLE Memo (width 10)
' R=Rich Text Field Memo (width 10)
' J=JPEG image Memo (width 10)
' I=Image File Reference Memo (width 10) (Not sure if L and I are the same or different)
' L=Image File Reference Memo (width 10) (sometimes referred to as a LINK field)
' H=HTML Memo (width 10) A5v9

Main questionable areas are Type I in the variables and Type I/L in the Dictionaries.

I hope this helps some!
__________________

Regards,

Ira J. Perlow
Computer Systems Design



Improved Install & Msg Box fix for all Products below
CSDA Code Utility for Alpha Five with Code Jump
- Update 25 Feb 2010 v2.72

Update 18 Apr 2010 v1.07 - Beta/Preview CSDA Screen Capture for Alpha Five
New Features - Support for toolbars and task panels, Panel Pointers, and
Diagnostic Info bug classification
Easier PDF doc access


Update 25 Feb 2010 v0.88 - Beta/Preview CSDA Barcoding for Alpha Five

Last edited by csda1 : 07-20-2008 at 09:19 AM.
csda1 is offline   Reply With Quote
Old 07-20-2008, 12:36 PM   #7
reynolditpi
Member
 
Join Date: Sep 2006
Posts: 378
Default Re: Variable Type "H"

Thanks guys. A lot of good info. For what it is worth, I have been able to consistantly reproduce the problem.

Here is the xbasic for the action script. Note the variable type H.

Code:
'Open the table that you want to update...
dim tbl as p 
tbl = table.open("test",FILE_RW_SHARED)
'Use an Xdialog box to prompt for field values.....
dim flag_ok_selected as l
flag_ok_selected = .f.
'
DIM  Prompt_var_1 as H
DIM  ui_get_parameters_result as C
Prompt_var_1 = convert_type("","H")
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
ui_get_parameters_result = ui_dlg_box("Enter field values",<<%dlg%
{region}
Htmlfield:| [.40Prompt_var_1];
{endregion};
{line=1,0};
{region}
<*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
{endregion};
%dlg%,<<%code%
if a_dlg_button = "ok" then 
	flag_ok_selected = .t. 
end if 

%code%)
if ui_get_parameters_result <> "OK" then 
	end 
end if 
	
tbl.enter_begin()
tbl.HTMLFIELD = prompt_var_1
tbl.enter_end(.t.)
tbl.close()
Also note that this action script produces an error and wont run.
T
reynolditpi is offline   Reply With Quote
Old 07-20-2008, 04:01 PM   #8
csda1
VAR
 
csda1's Avatar
 
Join Date: Apr 2000
Location: Boston, Massachusetts, USA
Posts: 3,181
Default Re: Variable Type "H"

Hi Tony,

Quote:
Originally Posted by reynolditpi View Post
.... Note the variable type H.

Code:
....
DIM  Prompt_var_1 as H
DIM  ui_get_parameters_result as C
Prompt_var_1 = convert_type("","H")
....
If you change the XBasic code line
DIM Prompt_var_1 as H
to
DIM Prompt_var_1 as C
it should work. "Type "H" in a memo field is treated as type "C" in XBasic.

However, whatever action script you were doing, has a bug in it that generates it as type "H", which is wrong. Since people using Action Scripts don't necessarily understand the code that it is generating, it is easier for a bug like this to slip into the code, particularly with new data types, as they don't look at the underlying code and can only recognize a bug when it causes a noticeable error.


Let us know what action script line you are using and it's parameters that generates the offending code, and report the bug to Alpha.
__________________

Regards,

Ira J. Perlow
Computer Systems Design



Improved Install & Msg Box fix for all Products below
CSDA Code Utility for Alpha Five with Code Jump
- Update 25 Feb 2010 v2.72

Update 18 Apr 2010 v1.07 - Beta/Preview CSDA Screen Capture for Alpha Five
New Features - Support for toolbars and task panels, Panel Pointers, and
Diagnostic Info bug classification
Easier PDF doc access


Update 25 Feb 2010 v0.88 - Beta/Preview CSDA Barcoding for Alpha Five
csda1 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Dialog: Custom control / input type="file" Antony Application Server Version 8 - Web/Browser Applications 7 07-17-2008 03:32 PM
Duplicate_record() creates "Argument is incorrect data type" error pk9 Alpha Five Version 7 14 03-08-2007 07:19 PM
property-sheet "Record List Combo" item type Daniel Weiss Web Application Server v7 0 01-26-2006 12:16 PM


All times are GMT -4. The time now is 11:10 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright © 2008, Alpha Software, Inc.