B4J Question Error writing to MySQL database - This method does not support arrays of primitives. - Declan    
Apr 26, 2024.RuntimeException: This method does not support arrays of primitives.
at anywheresoftware...:832)
Caused by: java.lang.RuntimeException: This method does not support arrays of primitives...
link: This works:
Dim cmd As DBCommand = CreateCommand("write_trans", Array(deviceMAC,Latitude(0...
link:
Dim Latitude() As Int
Or just use Int, not Array of Int.
Dim Latitude As Int...
link: But! as you are using JRDC2 for that, you wont be able to save a list into a column in MySQL, You ma...
Wish No "Types do not match" when converting an object to primitives. - jmon    
Aug 14, 2015Hi,
I recently got a list of annoying warnings in my log.
Types do not match. (Warning #22)
when I write something like that:
Dim Id As Int
Dim Text as JavaObject = "My Text"
Id = Text.Ru...
link: The warning comes from this line:
Dim Text As JavaObject = "My Text"
Trying to convert a string to a different object is in many cases a programming error. In this case your code is correc...
Wish Provide Non primitive members of custom types - Like C/C++ Structures. - agraham (first post)    
Aug 7, 2022   
(2 reactions)I don't understand your wish as custom types can already include non-primitive items. Indeed you do in your example code.
Also Java, and hence B4X can only pass parameters by value.
In the case of a non-primitive type the value of a variable is a reference to the object instance. The point of pass by value is that a called function cannot change the value of the original variable. However...
link: Hi
I have a work around. It seems like you can pass the results of non-primitive function arg...
B4J Question go to the primitive records When the record is clicked tabel view - EnriqueGonzalez (first post)    
Jul 12, 2021following code assumes that you:
1. the checkbox lives within the rows of the tableview
2. the check...
link:
what do you mean with primite records? how are you filling the tableview?
if i clicked to Check...
link: what do you mean with primite records? how are you filling the tableview?...
link: hi,
i have a table view. i want go to the primitive records When the record is clicked tabel view...
B4R Tutorial Memory, Variables and Objects - Erel    
Aug 13, 2019   
(6 reactions) be available.
Note that global variables, except of primitives, behave as constants. You cannot... (only primitives, strings and arrays of primitives are allowed)".
The reason for this error is that the Pin object created in the sub is destroyed when MySub ends.
Primitives (numeric types and... of primitives. It involves copying those objects in the stack.
As a general rule, objects should...
B4A Question Why: This sub should only be used for variables declaration or assignments of primitive values. (warning #29) - Bob Spielen (first post)    
Jul 28, 2020Thank you very much for the fast reply!!! Wünsche noch'n schönen Tag!!...
link: You should DIM it in process_globals. NO Initialization.
It must be initialized in service_create...
link: :
Starter - 34: This sub should only be used for variables declaration or assignments of primitive...
B4A Question How to add a primitive variable to a map (not its value)? [Solved] - Erel (first post)    
Apr 26, 2020
The second attempt with a custom type is what i want to elude. It means to define a custom type, de...
link: it twice it happens that "Object" is also a primitive type and so it´s not passed...
link: There is no reason for it to work with Object. It doesn't change anything.
When you assign: Vbl...
link:
Or with a custom type:
Last night :confused: I was about to write that the problem could be solved...
B4A Question user-defined types - conversion to array of primitive bytes - Erel (first post)    
Mar 23, 2020Best solution is to use B4J on the PC. It will make this task trivial.
which means the content of ...
link: Hi DonManfred
Dim Position As TPackPosition
Position.initialize
Position.Hour = DateTime.n...
link: This has been discussed before for .NET -> https://www.b4x.com/android/forum/threads/serializing-...
link: As far as i know there is no Pascal/Delphi implementation.
But using B4A/J/I you can use B4XSeriali...
B4A Question Are Strings Primitive and Stringbuilders Non-Primitive types? - Dimitris999 (first post)    
Feb 24, 2013OK. Thanκs Guys....
link: Correct....
link: I think I understand now.
If I do understand correctly, in my first example code:
Strb = Stra
...
link: It is more correct to say that Strings are immutables and StringBuilders are mutables....
B4A Tutorial Variables & Objects in Basic4android - Erel    
Mar 24, 2011   
(7 reactions) of variables: primitives and non-primitives types.
Primitives include the numeric types: Byte, Short, Int, Long, Float and Double.
Primitives also include: Boolean and Char.
List of types....html#post45511
Primitive types are always passed by value to other subs or when assigned to other variables...)
B = 45
End Sub
All other types, including arrays of primitives types and strings are categorized as non-primitive types.
When you pass a non-primitive to a sub or when you assign it to a different...
Page: 1  
2  
3  
4  
5  
6  
7