tableview

Async image set to cell with dynamic height bug

雨燕双飞 提交于 2020-01-06 14:01:17
问题 I'm experiencing bugs with my application when I'm trying to download and set an image async to a cell with dynamic height. Video of the bug: https://youtu.be/nyfjCmc0_Yk I'm clueless: can't understand why it happens. I'm saving the cell heights for preventing jumping issues and stuff, I do even update the height of the cell after setting the image. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { var post : Post var cell : PostCell post = Posts

How to intercept MouseEvent.MOUSE_CLICKED on TableView on JavaFX8

一世执手 提交于 2020-01-06 13:29:36
问题 I am creating a custom CheckBoxTableView where the selected items are displayed with a CheckBox. If the user attempts to sort the table once items are selected, it appears to mess up. I would like to prompt the user to see if they would like to continue. If so, I would like to clear the selection, if not, simply consume the event so the sorting doesn't happen. Unfortunately - my EventFilter seems to fire after the sort was completed. On the TableView constructor, I placed the following code:

How to properly use JavaFX TableView and ObservableList classes?

我的梦境 提交于 2020-01-06 12:57:20
问题 I got a class where I receive some collection structure: public class YIFY { private static List<Pelicula> resultados; public static void setResultados(List<Pelicula> resultados) { YIFY.resultados = resultados; } } Later, at another class I associate the contents of such List to a TableView . However I create an FXCollections.observableArrayList() which is set as the bind element to the table. This is how I do it: peliculas = FXCollections.observableArrayList(YIFY.getResultados());

Deleting a cell in search bar table view causes delete to be executed twice

淺唱寂寞╮ 提交于 2020-01-06 08:32:14
问题 I have a table view backed up by core data with NSFetchedResultsController instance. This table has a search bar that displays filtered data. The search bar has a separate NSFetchedResultsController (FRC from now) instance. So far so good, the data is fetched and shown as expected in the table view and also shown correctly in the search bar's table view (when searching for data). My problem is that if I try to delete a cell in the search bar's table view then I get a coredata exception :

Deleting a cell in search bar table view causes delete to be executed twice

眉间皱痕 提交于 2020-01-06 08:31:29
问题 I have a table view backed up by core data with NSFetchedResultsController instance. This table has a search bar that displays filtered data. The search bar has a separate NSFetchedResultsController (FRC from now) instance. So far so good, the data is fetched and shown as expected in the table view and also shown correctly in the search bar's table view (when searching for data). My problem is that if I try to delete a cell in the search bar's table view then I get a coredata exception :

Deleting a cell in search bar table view causes delete to be executed twice

旧时模样 提交于 2020-01-06 08:31:06
问题 I have a table view backed up by core data with NSFetchedResultsController instance. This table has a search bar that displays filtered data. The search bar has a separate NSFetchedResultsController (FRC from now) instance. So far so good, the data is fetched and shown as expected in the table view and also shown correctly in the search bar's table view (when searching for data). My problem is that if I try to delete a cell in the search bar's table view then I get a coredata exception :

how can i set two colors to alternative row in two different sections in UITableView in iphone

佐手、 提交于 2020-01-06 06:45:57
问题 I have a UITableView with two sections, section 0 contains 1 row and section 1 contains two rows. My Question how can i set two colors to alternative row.I tried the fallowing way but section0 first row and section1 first row shows same same color. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *cellIdentifier=@"cell"; UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:cellIdentifier]; if(cell==nil) {

Playing video in UITableViewCell iOS

让人想犯罪 __ 提交于 2020-01-06 05:22:06
问题 I want to display and play video in a table view cell. my code for that is: In cellForRowAtIndexPath: NSURL *videoURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@",path,[[arrAboutUs objectAtIndex:indexPath.row] valueForKey:@"content"]]]; MPMoviePlayerController* moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:videoURL]; [moviePlayer setControlStyle:MPMovieControlStyleNone]; moviePlayer.scalingMode = MPMovieScalingModeAspectFit; [moviePlayer.view setFrame:cell

Why does JavaFX table.getItems().clear() clear the ObservableList as well

送分小仙女□ 提交于 2020-01-06 03:55:07
问题 I've a JavaFX table defined as: TableView<Person> table = new TableView<>; //Person Class contains firstName,lastName & email properties //table has three columns First Name, Last Name & Email An ObservableList of Person s ObservableList<Person> persons = FXCollections.observableArrayList(); A background service, which task is to populate the table dynamically by adding entries( Person objects) to the ObservableList persons . table is binded as: table.itemsProperty().bind(service

Swift : How can I fill the cell when the data is empty?

浪尽此生 提交于 2020-01-06 03:37:06
问题 I'm using tableview. Sometimes my datas getting error, because it is empty data. When I get empty data, I want to return 1 or more cell and show empty data information texts like "No data available!". Code : func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { var a:Int = 0 if segmentControl.selectedIndex == 0 { a = 8 return a }else if segmentControl.selectedIndex == 1{ a = 4 return a }else if segmentControl.selectedIndex == 2{ a = 2 return a }else if