0
저는 여기에 붙어 있습니다 :프로모션/버블 랩 테이블 스크린 데이터
내 앱에 데이터를 채워야합니다.
class Parties < ProMotion::TableScreen
attr_accessor :_cells
@news = []
include MyUiModules
title 'Yazarlar'
refreshable callback: :on_refresh,
pull_message: "Pull to refresh",
refreshing: "Refreshing data…",
updated_format: "Last updated at %s",
updated_time_format: "%l:%M %p"
def on_refresh
#MyItems.pull_from_server do |items|
#@my_items = items
end_refreshing
#update_table_data
# end
end
def table_data
_cells = []
[{
title: nil,
cells: create_cells(_cells)
}]
end
def will_appear
Barbutton.create_bar(self)
set_attributes self.view, {
backgroundColor: hex_color("DBDBDB")
}
end
def go_to_next
App.delegate.slide_menu.show_menu
end
def create_cells(_cells)
BW::HTTP.get(URL) do |response|
json = BW::JSON.parse response.body.to_str
for line in json
_cells << { title: line["val_for_title"]}
end
end
_cells
end
end
: 나는 난생 처음 진흥을 사용하고
.... 홍보없이
내가 init 메소드에서 데이터를 가져 오기 위해 사용은
지금 내 코드는 다음과 같습니다
Unfotunately 이것은 빈 배열을 반환하고 해결 방법을 찾을 수 없습니다. 당신의 도움이
https://github.com/clearsightstudio/ProMotion/issues/248#issuecomment-21821293 – silasjmatson