Android Question AnotherDatePicker

Wien.Mart

Member
Licensed User
Longtime User
I added AnotherDatePicker as an existing module to a project and want to use the same in a layout but I get the error: Object should first be initialized(Panel). The date panel does not show and I get a message on the tablet: Programpaused on line: 173 holder.Visible = True and have a yellow highlight on AnotherDatePicker module.
 

Wien.Mart

Member
Licensed User
Longtime User
Hi Erel, please give me a moment to remove some of the files, it is already at 1.5mb and the upload allow only 512kb.
 
Upvote 0

Wien.Mart

Member
Licensed User
Longtime User
Hi Erel. Attached is the zip file. I removed other modules that are not yet used.
 

Attachments

  • icht.zip
    207.3 KB · Views: 268
Upvote 0

Harish Kumar Arya

Member
Licensed User
Longtime User
I am also getting the same error.
Added the ADP module, added the custom view in designer, declared in globals. Invoked by ADP.show method. Stops on line 173, holder.visible = true.
Sometimes this error goes away on its own. I am confused.
 
Upvote 0

Harish Kumar Arya

Member
Licensed User
Longtime User
B4X:
Sub Activity_Create(FirstTime As Boolean)
    Dim Cur As Cursor
    DateTime.DateFormat = DisplayFormat
    AHL.Initialize3 ("en", "IN")
    'Do not forget to load the layout file created with the visual designer. For example:
    If FirstTime Then
        SQL.Initialize(File.DirRootExternal, AppDB, True)
        SelectedDate  = "02 Nov 2014"'  DateTime.Date(DateTime.Now)
    End If
    Activity.LoadLayout("ExpenseEntry")
    lblCurrency.Text = AHL.CurrencySymbol
    tbl.Initialize(Me,"tbl", 1, Gravity.LEFT ,True)
    tbl.AddToActivity(Activity, 0, pnlEntry.Height + 10dip, 100%x, 100%y-pnlEntry.Height)
    tbl.RowHeight = 40dip
    tbl.TextSize = 18
    tbl.LineWidth = 1dip
    tbl.RowColor1 = Colors.White
    tbl.RowColor2 = Colors.RGB(188, 243, 240)
    tbl.HeaderColor = Colors.RGB(30,178,170)
    tbl.TableColor = Colors.White 
    tbl.StatusLabelTextSize = 20
    lblDate.Text = SelectedDate
    Cur = SQL.ExecQuery("SELECT name FROM sqlite_master WHERE type='table' AND name='Expense'")
    If Cur.RowCount = 0 Then
        Dim m As Map
        m.Initialize
        m.Put("ID", DBsub.DB_INTEGER)
        m.Put("dtExpense", DBsub.DB_TEXT)
        m.Put("Item", DBsub.DB_TEXT)
        m.Put("Quantity", DBsub.DB_REAL)
        m.Put("Cost", DBsub.DB_REAL)
        m.Put("Tag", DBsub.DB_TEXT)
        DBsub.CreateTable(SQL, "Expense",m ,"ID")
    Else
        DisplayList(SelectedDate)
    End If
   
End Sub
 
Upvote 0

Harish Kumar Arya

Member
Licensed User
Longtime User
Sorry, the line number for holder.visible = true ( in sub Show) is 187 in my version.
I have made minor modifications in ADP code for change of theme.
View attachment 30069
 

Attachments

  • A.png
    A.png
    41.9 KB · Views: 207
Upvote 0
Top