hello,
i am using a very simple AD-converter to measure voltages (circuit based on LTC1290). Till now i used old DOS-Laptops in the field to get and store the measurements. The connection went over the serial port by using the DTR, RTS and CTS lines and the 'port commands' of the io-system.
At the moment i am thinking about a change to a xda.
I need a 'clock', a 'send data' line and a 'receive data' line. They must be switched between zero and at least 3Volts.
Can anybody tell me wether this is possible with a xda ?
- Jan -
Yeah, i would presume you can use the serial lines, although I don't think there is a clock.
You could probably use one of the serial control lines as a clock, and another one as data in and one as data out. The +5V for the thing could also be spuulied by the XDA. You will most likely not get the 50 kilosamples/second the 1290 supports, but that's likely not to be what you want anyway.
thank you Peter Poelman,
yes, a sample rate of 50kilosamples/s is not my goal.
Meanwhile i found this general page about serial communicaion with Palm's: palm serial manager with a very general statement in the 'serial hardware section':
Some devices also have a configurable DTR (data terminal ready) signal. Normally, the DTR signal is always high.
Click to expand...
Click to collapse
Ok - some devices can manipulate the DTR-line - but which ? can the XDA ?
According to this page it seems not possible with the standard palm-os modules and routines to manipulate the the RTS line. I can only get status information about the DTR and CTS line - i am new to pda/xda programming i dont know very much about hardware architecture and but maybe someone her has some hints.
- Jan -
Hi there,
Does anyone out there how to preserve/restore the transient state of a CheckBox and/or Radio button?
So far, I'm using the following code, working for textbox
Code:
Public Sub PreserveState_TextBox(ByVal TB As TextBox)
Dim buffer As String = String.Empty
If True = PhoneApplicationService.Current.State.ContainsKey(TB.Name) Then
buffer = TryCast(PhoneApplicationService.Current.State(TB.Name), String)
If Not String.IsNullOrEmpty(buffer) Then
TB.Text = buffer
End If
End If
End Sub
Public Sub RestoreState_TextBox(ByVal TB As TextBox)
If True = PhoneApplicationService.Current.State.ContainsKey(TB.Name) Then
PhoneApplicationService.Current.State.Remove(TB.Name)
End If
PhoneApplicationService.Current.State.Add(TB.Name, TB.Text)
End Sub
it possible to modify the above code to work for Checkbox and/or Radiobutton?
If not, any ideas?
So far, I've been trying the sample "Tombstoning" sample code from Microsoft without any luck...
Thanks in advance!
Hi,
I'm not a VB developer, but storing the state of a checkbox is not much different from storing any other primitive type. What you could do is have a bool variable "isCbChecked" and store that bool state in your PhoneApplicationService.State.
Code:
PhoneApplicationService.Current.State.Add("isCbChecked", myCheckbox.IsChecked)
Then, when you're restoring your app, simply do
Code:
myCheckbox.IsChecked = (bool)PhoneApplicationService.Current.State.ContainsKey("isCbChecked");
keyboardP said:
Hi,
I'm not a VB developer, but storing the state of a checkbox is not much different from storing any other primitive type. What you could do is have a bool variable "isCbChecked" and store that bool state in your PhoneApplicationService.State.
Code:
PhoneApplicationService.Current.State.Add("isCbChecked", myCheckbox.IsChecked)
Then, when you're restoring your app, simply do
Code:
myCheckbox.IsChecked = (bool)PhoneApplicationService.Current.State.ContainsKey("isCbChecked");
Click to expand...
Click to collapse
Thanks a lot for your fast reply.
Can I ask for additional help on how to make your statements into generic procedures, at least to take them to something similar to what I posted?
Don't care if it's in C#
Thanks in advance!
GFR_2009 said:
Thanks a lot for your fast reply.
Can I ask for additional help on how to make your statements into generic procedures, at least to take them to something similar to what I posted?
Don't care if it's in C#
Thanks in advance!
Click to expand...
Click to collapse
Off the top of my head, something like this should work (C# code).
Code:
public static T RestoreState<T>(string key)
{
if (PhoneApplicationService.Current.State.ContainsKey(key))
{
return (T)PhoneApplicationService.Current.State[key];
}
return null;
}
'T' is the type that will be used. In C# 'T' is a special character denoting the generic type, not something I just used
So in the code above, the return type is 'T' and when using RestoreState, it will be 'RestoreState<Textbox>("TB.Name");'. The value of 'TB.Name' will be searched within the dictionary and, if it's found, it will cast that object as 'T' (Textbox) and return it, otherwise it will return null.
Hi,
So far, I did the following and while no error is raised, nothing happens...
Code:
Public Function Backup(ByVal token As String, ByVal value As Object) As Boolean
If Nothing Is value Then
Return False
End If
Dim store = PhoneApplicationService.Current.State
If store.ContainsKey(token) Then
store(token) = value
Else
store.Add(token, value)
End If
Return True
End Function
Public Function Restore(Of T)(ByVal token As String) As T
Dim store = PhoneApplicationService.Current.State
If Not store.ContainsKey(token) Then
Return Nothing
End If
Return CType(store(token), T)
End Function
I call them as follows
Code:
Backup(Me.CheckBox_1.Name, Me.CheckBox_1)
Restore(Of CheckBox)(Me.CheckBox_1.Name)
Don't where is the error, maybe you could take a look and help me out.
Any help is much appreciated!
Where are you calling the Backup and Restore functions? Since your doing page specific things, you could do it in the OnNavigatedFrom and OnNavigatedTo methods, respectively.
keyboardP said:
Where are you calling the Backup and Restore functions? Since your doing page specific things, you could do it in the OnNavigatedFrom and OnNavigatedTo methods, respectively.
Click to expand...
Click to collapse
Hi,
I'm calling them in the OnNavigatedTo and OnNavigatedFrom methods, as you pointed out
Unfortunately, nothing happens at all!
Thanks!
Hi,
As far as I can tell, there's nothing wrong with your saving/loading code. When you call
"Restore(Of CheckBox)(Me.CheckBox_1.Name)", is that returning a bool? You need to assign that bool to the checkbox:
Code:
myCheckbox.IsChecked = Restore(Of CheckBox)(Me.CheckBox_1.Name);
Also, all variables are reset when the page loads, so make sure you have set "myCheckbox.IsChecked" anywhere else on the page that could be called when the page loads.
Please, check the converted code of the above functions, to C#
Code:
public bool Backup(string token, object value)
{
if (null == value)
{
return false;
}
var store = PhoneApplicationService.Current.State;
if (store.ContainsKey(token))
{
store(token) = value;
}
else
{
store.Add(token, value);
}
return true;
}
public T Restore<T>(string token)
{
var store = PhoneApplicationService.Current.State;
if (! (store.ContainsKey(token)))
{
return default(T);
}
return (T)(store(token));
}
Do you think they are OK?
How should I call them ?
Clearly, the restore does not returns a boolean...
Honestly, I'm lost now!
Hope this helps to find the culprit.
It seems okay to me. You'll have to do some debugging. Set a breakpoint inside the Backup and Restore methods. Step through each line and make sure it's going to the line you expect it to and that the value being set is the correct one.
I haven't seen the tombstoning sample from MSDN, but can you get that to work? If so, is the generic method causing the problem? Or can you not get it to work at all?
Hi,
Sorry for the delay in getting back, but I was trying different codes and at least I found the cause.
Code:
Me.NavigationService.Navigate(New Uri("/PivotPage1.xaml?Name=" & "John", UriKind.Relative))
[B]Me.NavigationService.GoBack[/B]()
Me.NavigationService.Navigate(New Uri("/PivotPage1.xaml", UriKind.Relative))
Everything works fine, and the Checkbox state is saved/restored (in the Pivot Page) if I GO BACK using the GoBack hardware button or Me.NavigationService.GoBack
But, the state's dictionary entry is lost or ignored if I go back with the Navigate service (lines 1 and 3)...
Problem is that I need to get back with the query string...
The query string contains a value taken in the SelectedItem event of PAGE2's ListBox, and automatically once retrieved must go back.
I didn't know until know, that NavigationService.Navigate creates a new page instance or something like that in the backstack...
Any sugestions are welcomed!
Hi,
There are various methods you can use depending on the app's architecture. For example, you could have a 'shared' class that contains a shared field that holds the SelectedItem value. When the user selects the item, set the shared field's value and then when you go back, you can get the value from the shared field.
keyboardP said:
Hi,
There are various methods you can use depending on the app's architecture. For example, you could have a 'shared' class that contains a shared field that holds the SelectedItem value. When the user selects the item, set the shared field's value and then when you go back, you can get the value from the shared field.
Click to expand...
Click to collapse
So, no other way to cope with the navigation service?
It's a strange behaviour for sure...
Will try your ideas.
Thanks a lot for your reply!
GFR_2009 said:
So, no other way to cope with the navigation service?
It's a strange behaviour for sure...
Will try your ideas.
Thanks a lot for your reply!
Click to expand...
Click to collapse
There are other ways. For example, instead of using the PhoneApplicationService to store the tombstoning information, you could put it in a querystring for page 2. Then, in page 2, you could add the information from the previous page to a querystring AND the information of the selected item to the querystring. Navigate to page 1, with the querystring that contains information on what was there before and what the user selected. Tombstoning is there for when the user presses the hardware search button, home button, a phone call arrives etc.. It's not there for the navigation of the app. That's where querystrings, shared variables, binary serialization etc... come into play.
The concept of the navigation service is similar to a website. For example, when you submit something and then go back, it might still be there in the page state. However, if you submit something and then reload the previous page by typing it in the address bar, it becomes a completely new page as no state is stored.
keyboardP said:
There are other ways. For example, instead of using the PhoneApplicationService to store the tombstoning information, you could put it in a querystring for page 2. Then, in page 2, you could add the information from the previous page to a querystring AND the information of the selected item to the querystring. Navigate to page 1, with the querystring that contains information on what was there before and what the user selected. Tombstoning is there for when the user presses the hardware search button, home button, a phone call arrives etc.. It's not there for the navigation of the app. That's where querystrings, shared variables, binary serialization etc... come into play.
The concept of the navigation service is similar to a website. For example, when you submit something and then go back, it might still be there in the page state. However, if you submit something and then reload the previous page by typing it in the address bar, it becomes a completely new page as no state is stored.
Click to expand...
Click to collapse
Hi,
Will try your suggested approach, and thanks a lot for the last explanation on how the darn thing works.
Thanks again!
GFR_2009 said:
Hi,
Will try your suggested approach, and thanks a lot for the last explanation on how the darn thing works.
Thanks again!
Click to expand...
Click to collapse
You're welcome . It's one of those things that take a bit of time to understand, but starts to make sense. You might be interested in a free WP7 development ebook by Charles Petzold.
keyboardP said:
You're welcome . It's one of those things that take a bit of time to understand, but starts to make sense. You might be interested in a free WP7 development ebook by Charles Petzold.
Click to expand...
Click to collapse
I already have the book, but will need a deeper reading
So far, I've been testing your idea of using global classes and works ok.
Thanks a lot for being so cooperative, it's much appreciated!
GFR_2009 said:
I already have the book, but will need a deeper reading
So far, I've been testing your idea of using global classes and works ok.
Thanks a lot for being so cooperative, it's much appreciated!
Click to expand...
Click to collapse
No worries! If programming was super easy everyone would be doing it
keyboardP said:
No worries! If programming was super easy everyone would be doing it
Click to expand...
Click to collapse
Never said better!
Hey all,
Apologies if this has been asked before, I've scoured the search function but couldn't find it.
A feature I really miss from iOS and Android (I've had both) is where you look up a restaurant or something on your browser and it recognises the telephone number and underlines it.. so you just tap to call.
Right now I have to copy the number (or memorise it), go to the phone function and then create a new contact, paste the number and then call.
Is there an App or something that gives that functionality in WP (I have a HTC Titan with latest updates)?
Thanks,
K
Swisskom said:
Hey all,
Apologies if this has been asked before, I've scoured the search function but couldn't find it.
A feature I really miss from iOS and Android (I've had both) is where you look up a restaurant or something on your browser and it recognises the telephone number and underlines it.. so you just tap to call.
Right now I have to copy the number (or memorise it), go to the phone function and then create a new contact, paste the number and then call.
Is there an App or something that gives that functionality in WP (I have a HTC Titan with latest updates)?
Thanks,
K
Click to expand...
Click to collapse
something called 'send to my wp7' in marketplace.
drupad2drupad said:
something called 'send to my wp7' in marketplace.
Click to expand...
Click to collapse
I've just downloaded and set it up, and its useful (same as Chrome to phone on Android) but not what I meant. Essentially if I'm browsing the web on my phone, I want telephone numbers (on the web page) to automatically open up the phone program. All this is on the phone, not my PC.
Cheers
How are the numbers being formatted on the web page? IE9 I think looks for specific syntax.
ScottSUmmers said:
How are the numbers being formatted on the web page? IE9 I think looks for specific syntax.
Click to expand...
Click to collapse
Like (us of a numbers) 601-555-1234 just as you would dial them. The os pickes up a set of 7,10 or 11 numbers as phone numbers and dumps them to the dialer. Its the way it should have always been (nice)
I have Samsung Focus and running 7720 and I just tap the phone number on the web page and it take me to a screen asking if I want to call or store number.
Seed 2.0 said:
I have Samsung Focus and running 7720 and I just tap the phone number on the web page and it take me to a screen asking if I want to call or store number.
Click to expand...
Click to collapse
same here. Never had a single issue with this.
Same here... always works - is it do to the international settings? (Settings, swipe, phone, international assist)? i have mine on
Also in IE try changing from mobile to desktop version to see if it makes a difference.
ohgood said:
Like (us of a numbers) 601-555-1234 just as you would dial them. The os pickes up a set of 7,10 or 11 numbers as phone numbers and dumps them to the dialer. Its the way it should have always been (nice)
Click to expand...
Click to collapse
is the quoted phone number showing up as a link for anyone? Its not clickAble for me on 8107 with mobile or desktop setting. Also tried international assist setting and it had no effect as suspected.
One feature I miss from previous OSes is the lack of ability to paste a phone number in the dialer. It is not always the case that we are able to successfully dial a number by tapping on it.
bobzero said:
is the quoted phone number showing up as a link for anyone? Its not clickAble for me on 8107 with mobile or desktop setting. Also tried international assist setting and it had no effect as suspected.
Click to expand...
Click to collapse
Does not work for me, neither do national (Swiss) or other European numbers. I usually have the opposite problem with iOS etc.. i.e. any sequence of numbers (including serial numbers) being interpreted as a telephone number
419-685-5468
419.685.5468
(419) 685-5468
(419) 685 5468
(419)6855468
419 685 5468
4196855468
Do any of these show up as clickable? If so post your OS version
None are clickable on 8107 here.
bobzero said:
419-685-5468
419.685.5468
(419) 685-5468
(419) 685 5468
(419)6855468
419 685 5468
4196855468
Do any of these show up as clickable? If so post your OS version
None are clickable on 8107 here.
Click to expand...
Click to collapse
All but the last one were clickable for me (version 7720). I attached a screenshot of what I get with the first 6 numbers. Gives option to call, and edit number beforehand if necessary.
dtboos said:
All but the last one were clickable for me (version 7720). I attached a screenshot of what I get with the first 6 numbers. Gives option to call, and edit number beforehand if necessary.
Click to expand...
Click to collapse
Same results for me too. HTC Titan ATT 7720.
Interesting that it is working for you guys. I tried changing my region settings all to USA and now it is working was previously set to Canada.
Weird... report that one to MS... i would think it would urk a lot of people. I live in the US.
Not clickable to me. im using the dft v3 rom on my 7 Pro. How i have managed to pick up numbers from the browser is to copy the number, create a new contact and then call to the number. Leaving the name field empty makes that contact appear frist for easy calling and deletion after the call.
So bottom line here would be to get the paste option to the dialer. That is a WAY better solution to call numbers from the browser, than have the browser identify all numbers as phone numbers.
bobzero said:
is the quoted phone number showing up as a link for anyone? Its not clickAble for me on 8107 with mobile or desktop setting. Also tried international assist setting and it had no effect as suspected.
Click to expand...
Click to collapse
That phone number shows up as orange text that is clickable. I have my phone set to mobile view priority.
---------- Post added at 04:28 PM ---------- Previous post was at 04:26 PM ----------
dtboos said:
All but the last one were clickable for me (version 7720). I attached a screenshot of what I get with the first 6 numbers. Gives option to call, and edit number beforehand if necessary.
Click to expand...
Click to collapse
All but the last one work for me also. Plus the web page has to be 100% loaded before they are clickable.
I Did some more testing. The only value that seems to matter is your region format setting (second from the top) inside the region+location settings. Make sure it is set to united states. Everything else can be whatever.
Anyone have the ear of someone on the windows phone tem and could pass this bug on? There's no obvious reason why the Canadian region should not have the same clickable phone links as we generally use the same formats as our friends to the south. I would chalk this up as an oversight, Canada usually gets forgotten.
Also tested Australian, and it is not working for the above numbers, but then the Aussies use a different number format iirc.
adhoc125 said:
One feature I miss from previous OSes is the lack of ability to paste a phone number in the dialer. It is not always the case that we are able to successfully dial a number by tapping on it.
Click to expand...
Click to collapse
There are other dialers you can download that you can past phone numbers into. Give one of those a try.
Example the rom name K50a40_S112_150610_ROW_TO_K50a40_S114_150618_ROW_W CDE.zip
Forum setup long word to 50 characters.
123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890
Yep, this has always been the case, for as long as I can remember. Not sure if the limitation is vBulletin, SQL or something else?
We've encountered the same in our forum & turned out to be vBulletin bug.
@natong
It would be better if you put all those long filenames inside CODE tag.
Titokhan said:
We've encountered the same in our forum & turned out to be vBulletin bug.
@natong
It would be better if you put all those long filenames inside CODE tag.
Click to expand...
Click to collapse
Could you adjust more width and unlimit height for CODE tag ?
Currently it limit to display only 10-20 lines height with scrollbar.
@natong
Sorry, I can't help you with that. But its indeed better to get a CODE window without any horizontal scrollbar.
I known how to post long word now.
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890