Read-only control, want to skip focus

133 views
Skip to first unread message

Dawn Wolthuis

unread,
Nov 23, 2009, 8:02:09 AM11/23/09
to InterSystems: Zen Community
Is there a way to specify a control as something that should be
skipped as users tab through fields?

For example, we have a form with a bunch of input fields in it and one
read-only control that their cursor need not land on. I would like
them to see it without it interfering with the flow. Thanks in advance
for any suggestions. --dawn

--
Dawn M. Wolthuis

Take and give some delight today

Neerav Verma

unread,
Nov 23, 2009, 9:31:51 AM11/23/09
to intersys...@googlegroups.com
Have you tried using   

tabindex=1
tabindex=2...
 
Thank You,

Neerav Verma
http://www.linkedin.com/in/vneerav
------------------------------------------------------
Stephen Leacock  - "I detest life-insurance agents: they always argue that I shall some day die, which is not so."


--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions

Dawn Wolthuis

unread,
Nov 23, 2009, 9:57:31 AM11/23/09
to intersys...@googlegroups.com
Thanks, yes, I was hoping to avoid having to number them all. Is that
the only way to accomplish skipping over a read-only field?
Thanks. --dawn

Neerav Verma

unread,
Nov 23, 2009, 10:01:38 AM11/23/09
to intersys...@googlegroups.com
I wouldn't say the only way, but the only way I know of unless the readonly field was out of the form.

Thank You,

Neerav Verma
http://www.linkedin.com/in/vneerav
------------------------------------------------------
Marie von Ebner-Eschenbach  - "Even a stopped clock is right twice a day."

Neerav Verma

unread,
Nov 23, 2009, 10:02:13 AM11/23/09
to intersys...@googlegroups.com
I wouldn't say the only way, but the only way I know of 

Thank You,

Neerav Verma
http://www.linkedin.com/in/vneerav
------------------------------------------------------
Mike Ditka  - "If God had wanted man to play soccer, he wouldn't have given us arms."

Dawn Wolthuis

unread,
Nov 23, 2009, 11:05:30 AM11/23/09
to intersys...@googlegroups.com
If I put a tabIndex on everything else, then I can skip this in the
normal flow, but it goes to it after the others in the form. If I put
tabIndex="" or tabIndex="0" it keeps it in the tab order. If I make it
tabIndex="-1" and have the other tabs in there, this one will still
come last. If I remove all other tabIndex attributes and just put
tabIndex="-1" on this one, it keeps it in the original order.

So, even using tabIndex=... I have not figured out how to completely
bypass a control. Other suggestions?
Thanks a bunch. --dawn

On Mon, Nov 23, 2009 at 8:31 AM, Neerav Verma <vne...@gmail.com> wrote:

Neerav Verma

unread,
Nov 23, 2009, 11:08:07 AM11/23/09
to intersys...@googlegroups.com
What happens if you do disabled-true

Thank You,

Neerav Verma
http://www.linkedin.com/in/vneerav
------------------------------------------------------
Ted Turner  - "Sports is like a war without the killing."

Derek Day

unread,
Nov 23, 2009, 11:26:33 AM11/23/09
to intersys...@googlegroups.com
You might use the old html form trick of using the onfocus event of the control to change the focus.

If it seems like an obvious misbehavior to allow READONLY controls to have focus, then I would just report this to support as an enhancment/bug fix.

Dawn Wolthuis

unread,
Nov 23, 2009, 2:02:34 PM11/23/09
to intersys...@googlegroups.com
Yes, I'm a bit embarrassed to say that I tried that before posting. I
have this in the onfocus method, where PreferredPhone follows Country
and I want to show the Country but not have any focus on the Country
read-only radioSet (which has only one Country in it right now).

ClientMethod skipCountry() [Language = javascript]
{
zenPage.getComponentById('PreferredPhone').focus();
return;
}

This did not work. It still gave focus to the read-only Country
radioSet. Ah well, it's a nit, but a user-experience nit. --dawn

Vu Pham

unread,
Nov 24, 2009, 10:54:19 AM11/24/09
to intersys...@googlegroups.com, dawnwo...@gmail.com, intersys...@googlegroups.com

Hi All,
I have the file in Bulgarian language. I would like to read the content and insert into database. Do you know how to deal with uni-code .
Thanks,
Vu

BG.txt

pfc

unread,
Nov 24, 2009, 11:35:29 AM11/24/09
to intersys...@googlegroups.com

Vu

 

You set Unicode mode (or not) when you do a Caché install

You can tell if it’s installed by

>write $zv

Cache for Windows (x86-32) 2009.1 (Build 446U) Thu Jul 9 2009 14:35:45 EDT

 

The U after the build number indicates a unicode install

 

I *think* you have to re-install Caché to move from non-Unicode to Unicode

 

Peter

--

You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4633 (20091124) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Benjamin Spead

unread,
Nov 24, 2009, 11:41:26 AM11/24/09
to intersys...@googlegroups.com

[quote]

I *think* you have to re-install Caché to move from non-Unicode to Unicode

[/quote]

 

Yes you can.  It will just put the Unicode binaries on top.  You can mount your existing .dats and off you go.

 

Note – once you have Unicode data in a DB, it can no longer be mounted to an 8-bit instance of Caché.

 


Vu Pham

unread,
Nov 24, 2009, 11:41:42 AM11/24/09
to intersys...@googlegroups.com

Hi Peter,
I followed your instruction, and the system is unicode install.
Thanks,
Vu




pfc <p...@xisltd.net>

11/24/2009 08:35 AM


To
<intersys...@googlegroups.com>
cc
Subject
RE: [InterSystems-Zen] UTF-8


pfc

unread,
Nov 24, 2009, 12:11:45 PM11/24/09
to intersys...@googlegroups.com

Ben

 

I thing that’s what I meant – ie do a re-install “over the top of the existing Caché” didn’t quite get from my brain to my fingers :}

 

Peter

pfc

unread,
Nov 24, 2009, 12:13:21 PM11/24/09
to intersys...@googlegroups.com

Vu

 

Looks like you have a Unicode install – what’s the problem with “dealing with Unicode” that you are getting?

Is it on the file import – if so what code are you using ?

 

Peter

 

 

 

From: Vu Pham [mailto:Vu_...@bio-rad.com]
Sent: 24 November 2009 16:42
To: intersys...@googlegroups.com
Subject: RE: [InterSystems-Zen] UTF-8

 

image001.gif

Vu Pham

unread,
Nov 24, 2009, 12:29:19 PM11/24/09
to intersys...@googlegroups.com

Hi Peter,
This is a file I am trying to import.



As the screen below, the file is saved as UTF-8

BG.txt

pfc

unread,
Nov 24, 2009, 12:39:32 PM11/24/09
to intersys...@googlegroups.com

Vu

 

What’s the code look like that you are using to import it -- or are you using some other method?

 

Peter

 

From: Vu Pham [mailto:Vu_...@bio-rad.com]
Sent: 24 November 2009 17:29
To: intersys...@googlegroups.com
Subject: RE: [InterSystems-Zen] UTF-8

 

--

You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions

image001.gif

Vu Pham

unread,
Nov 24, 2009, 12:43:19 PM11/24/09
to intersys...@googlegroups.com

Hi Peter,
I am sorry. You meant my code...


        Set currentServer = $ZUTIL(110)
       
If (currentServer = "UCSRV1")
       
{
               
Set Path = "/DATABASE2/xfer/Process/"
       
}
       
ElseIf(currentServer = "UCSRV2")
       
{
               
Set Path = "/FILE/Process/"
       
}

       
Set fileName = Path _ "BG.txt"
       
open fileName:("RS"):10
       
if ($test = 0)
       
{
               
set errorMsg = "Could not open file"
               
do ..Log(fileName, , , , , , errorMsg)
               
quit
       
}

       
use fileName

       
// disable EOF error because we are naturally reading to EOF
       
do $zutil(68, 40, 1)

       
set linesRead = 0
       
set eof = 0
       

       
for
       
{
               
// read a record
               
use fileName
               
read line
               
if ($ZEOF)
               
{
                       
quit
               
}
               
// if we determine the line is in UTF-8:
               
// set ^||line = $zconvert(^||line, "I", "UTF8")

               
set fileType = $Extract(fileName, 1, 2)
               
set token = $Extract(line, 1, 14)
               
// parse line into fields
               
set recordTemp = $listfromstring(line, "|")
               
set fields = $listlength(recordTemp)
               
set record = ""
                       
//use 0
                       
//w line, !
               
for index = 1:1:fields
               
{
                       
set field = $zstrip($listget(recordTemp, index), "<>W")
                       
                       
if (index = 1)
                       
{
                               
set Code = field
                       
}
                       
if (index = 2)
                       
{
                               
set CodeName = field
                       
}
                       
if (index = 3)
                       
{
                               
set Language = field
                       
}
                       
                       
               
}
               
//use 0
               
//w Code _ " " _ CodeName _ " " _ Language, !
               
&SQL(Update Codelist.AnalyteDescription
                                       
Set Name = :CodeName, "Translation" = 0
                                       
where LanguageKey = lower(:Language) and Analyte = :Code)
               
quit:(eof '= 0) // exit processing loop after an EOF record
       
}


       
close fileName

       
quit 1






pfc <p...@xisltd.net>

11/24/2009 09:39 AM


To
<intersys...@googlegroups.com>
cc
Subject
RE: [InterSystems-Zen] UTF-8


Vu Pham

unread,
Nov 24, 2009, 12:45:54 PM11/24/09
to intersys...@googlegroups.com, intersys...@googlegroups.com

Hi Peter,
I am reading my code again. I forgot to un-comment the section of UTF-8.
It is working now. Thanks for your time.
Vu



pfc <p...@xisltd.net>

11/24/2009 09:39 AM


To
<intersys...@googlegroups.com>
cc
Subject
RE: [InterSystems-Zen] UTF-8





pfc

unread,
Nov 24, 2009, 12:53:36 PM11/24/09
to intersys...@googlegroups.com

Vu

 

:}

 

FYI

I used to do open/use/close but I find it’s much more compact code to use %Libray.File – no EOF trapping or code to test fro file there etc

 

Set oFile=##class(%Library.File).%New(“<file_name>”)

Set sc=oFile.Open(“R”)

If sc’=$$$OK quit sc

 

While ‘oFile.AtEnd {

   Set xLine=oFile.ReadLine(10000)

   If xLine =”” {

 

   }else{

    //process non blank line

  }

 

}

 

Do oFile.Close()

 

And all the tests are encapsulated in the oFile object !!

image001.gif

Vu Pham

unread,
Nov 24, 2009, 10:26:02 PM11/24/09
to intersys...@googlegroups.com

Hi Peter,
if my code is like below
        Set FileName = Path _ "AffiliatedComp.txt"
       
Set stream=##class(%FileCharacterStream).%New()
       
Set stream.Filename=FileName
        ......
         do stream.%Save()
       
do stream.%Close()

How do make the file with UTF-8 encoded ?

Thanks for your help,
Vu


pfc <p...@xisltd.net>

11/24/2009 09:53 AM

Vlado

unread,
Nov 25, 2009, 1:04:25 AM11/25/09
to InterSystems: Zen Community
do stream.TranslateTableSet("UTF8")
> From: Vu Pham [mailto:Vu_P...@bio-rad.com]
> Sent: 24 November 2009 17:46
> To: intersys...@googlegroups.com
> Cc: intersys...@googlegroups.com
> Subject: RE: [InterSystems-Zen] UTF-8
>
> Hi Peter,
> I am reading my code again. I forgot to un-comment the section of UTF-8.
> It is working now. Thanks for your time.
> Vu
>
> pfc <p...@xisltd.net>
> 11/24/2009 09:39 AM
>
> Please respond to
> intersys...@googlegroups.com
>
> To
> <intersys...@googlegroups.com>
> cc
>
> Subject
> RE: [InterSystems-Zen] UTF-8
>
> Vu
>
> What’s the code look like that you are using to import it -- or are you
> using some other method?
>
> Peter
>
> From: Vu Pham [mailto:Vu_P...@bio-rad.com]
> Sent: 24 November 2009 17:29
> To: intersys...@googlegroups.com
> Subject: RE: [InterSystems-Zen] UTF-8
>
> Hi Peter,
> This is a file I am trying to import.
>
> As the screen below, the file is saved as UTF-8
>
> --
> You received this message because you are subscribed to the Google Groups
> "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com
> To unsubscribe from this group, send email to
> InterSystems-Z...@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions:http://groups.google.com/group/InterSystems-ZEN/web/community-terms-a...
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4633 (20091124) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
> --
> You received this message because you are subscribed to the Google Groups
> "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com
> To unsubscribe from this group, send email to
> InterSystems-Z...@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions:http://groups.google.com/group/InterSystems-ZEN/web/community-terms-a...
>
> --
> You received this message because you are subscribed to the Google Groups
> "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com
> To unsubscribe from this group, send email to
> InterSystems-Z...@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions:http://groups.google.com/group/InterSystems-ZEN/web/community-terms-a...
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4633 (20091124) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
> --
> You received this message because you are subscribed to the Google Groups
> "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com
> To unsubscribe from this group, send email to
> InterSystems-Z...@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions:http://groups.google.com/group/InterSystems-ZEN/web/community-terms-a...
>
>  image_gif_part
> 123KViewDownload

Vu Pham

unread,
Nov 25, 2009, 12:08:05 PM11/25/09
to intersys...@googlegroups.com, InterSystems: Zen Community

Hi,
Thank your for your help.

I have another question, it is also related to UTF-8. I have the code below, it is used to write to the postscript template.

How do you encode for the write command with Non-Western language.
Thanks,
Vu
       
       
//get the LotID
       
set LotObj = ##class(CodeList.Lot).%OpenId(LotNum)
       
       
set psFileName = ReportDir_"LC"_##class(Report.ReportUtil).PaddedLabNum(..Lab.LabNo)_LotNum_"-"_FileDate_".ps"

       
do ##class(%File).Delete(psFileName)
       
//if ##class(%File).CopyFile(psHeaderFileName,psFileName) {
               
open psFileName:"WA"
               
use psFileName
               
do ##class(Report.Reports).GenPsHeader(LangId,PaperSizeFormat,1)
               
write "("_psHeaderFileName_") run",!
               
set LotExpireDate = ##class(Report.ReportUtil).ConvertDate(..Lab.Site.SiteAddress.Country.%Id(),$ZD(LotObj.ExpirationDate,8),.ErrorMessage)
               
if (ReportDest = "instqc"){
                       
write !,"/a1 (InstantQC "_^ReportTran(LangId,"lab_comp_title_t")_") def",!
               
}
               
else{
                       
write !,"/a1 ("_^ReportTran(LangId,"lab_comp_title_t")_") def",!
               
}
               
write "/a2 ("_^ReportTran(LangId, "lab_t")_" "_##class(Report.ReportUtil).PaddedLabNum(..Lab.LabNo)_") def",!
               
write "/a3 ("_ProductName_")def",!
               
write "/a4 ("_^ReportTran(LangId, "lot_t")_" "_LotObj.%Id()_") def",!




Vlado <vili...@earthlink.net>

11/24/2009 10:04 PM


To
"InterSystems: Zen Community" <intersys...@googlegroups.com>
cc
Subject
[InterSystems-Zen] Re: UTF-8





For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions


Vlado

unread,
Nov 26, 2009, 3:28:01 AM11/26/09
to InterSystems: Zen Community
Hi Vu,

s line1=$zconvert(line, "O", "UTF8")

Method WriteFile() [ ZenMethod ]
{
set filename="c:/temp/test.txt"
open filename:"WNS":0 Else Quit $$$ERROR($$
$FileCanNotOpen,filename)
use filename s i=""
1 s i=$o(^VICS.BGD(i)) g:i="" end s line=$listget(^VICS.BGD(i),3)
s line1=$zconvert(line, "O", "UTF8")
write line1,! g 1
end close filename
}

Can you tell me please, what software do you use for taking snap shot
of the screen like image?
> Vlado <viliyc...@earthlink.net>

Vu Pham

unread,
Nov 30, 2009, 11:48:37 AM11/30/09
to intersys...@googlegroups.com, InterSystems: Zen Community

Hi,

Can I use these encoding below for function $zconvert.
I am using the UTF8, but it does not fit my need because the language is Bulgarian
Thanks
Vu


Western European 8859-15 1252 28605
Central European 8859-2 1250 28592
Cyrillic 8859-1 1251 28591
Greek 8859-7 1253 28597
Turkish 8859-9 1254 28599
Hebrew 8859-8 1255 28598
Arabic 8859-6 1256 28596
Baltic Rim 8859-4 1257 28594
Korea iso-2022-kr 949 50225
Japan (JIS) N/A 932 50220


Vlado

unread,
Nov 30, 2009, 7:54:49 PM11/30/09
to InterSystems: Zen Community
Hi Vu,
I use Bulgarian too:)
and I have no problems but I am on Windows PC.
How I can see you use Unix.
The above encodings you can use with $ZMODE in
Open or Use commands.Read the documentation.
Go to search box and search for
"encoding $zmode"

Vu Pham

unread,
Nov 30, 2009, 8:17:44 PM11/30/09
to intersys...@googlegroups.com, InterSystems: Zen Community

Hi,
I have no problem to use what you sent to me from previous emails for the text file.
But I am trying to do the same for the postscript file, but it does not work.

Here is my prologue file




Here is the result file



having this line in red with wrong encoding

        sfb high (Ð?цетаминофен) csCons ndl



Thanks,
Vu








Vlado <vili...@earthlink.net>

11/30/2009 04:54 PM


To
"InterSystems: Zen Community" <intersys...@googlegroups.com>
cc
Subject
[InterSystems-Zen] Re:


--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions


LCHeader.ps
Lab103763_092009_20091127-075516.ps

Vlado

unread,
Nov 30, 2009, 10:20:38 PM11/30/09
to InterSystems: Zen Community
I don't use PS files, but how I can see looking in the files
you have
/isoEncode { dup length dict begin

/Helvetica-Narrow-Bold findfont isoEncode /hnbFont6 exch definefont
pop
/hnbFont6 /hnbFont6 findfont 6.5 scalefont def

/Helvetica-Narrow-Bold findfont isoEncode /hnbFont7 exch definefont
pop
/hnbFont7 /hnbFont7 findfont 7 scalefont def

....
and probably this is the reason you can not see them the right way,
because they are in UTF8 format.

On Nov 30, 5:17 pm, Vu Pham <Vu_P...@bio-rad.com> wrote:
> Hi,
> I have no problem to use what you sent to me from previous emails for the
> text file.
> But I am trying to do the same for the postscript file, but it does not
> work.
>
> Here is my prologue file
>
> Here is the result file
>
> having this line in red with wrong encoding
>
>         sfb high (Ð?цетаминофен) csCons ndl
>
> Thanks,
> Vu
>
> Vlado <viliyc...@earthlink.net>
> For more options, visit this group athttp://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions:http://groups.google.com/group/InterSystems-ZEN/web/community-terms-a...
>
>  LCHeader.ps
> 19KViewDownload
>
>  Lab103763_092009_20091127-075516.ps
> 7KViewDownload
Reply all
Reply to author
Forward
0 new messages